Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: logdog/server/cmd/logdog_archivist/main.go

Issue 2647083003: LogDog: Use luci_config/server packages for config (Closed)
Patch Set: Comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | logdog/server/cmd/logdog_collector/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 9
10 "github.com/luci/luci-go/common/auth" 10 "github.com/luci/luci-go/common/auth"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 subscriptionErrorDelay = 10 * time.Second 50 subscriptionErrorDelay = 10 * time.Second
51 ) 51 )
52 52
53 // application is the Archivist application state. 53 // application is the Archivist application state.
54 type application struct { 54 type application struct {
55 service.Service 55 service.Service
56 } 56 }
57 57
58 // run is the main execution function. 58 // run is the main execution function.
59 func (a *application) runArchivist(c context.Context) error { 59 func (a *application) runArchivist(c context.Context) error {
60 » cfg := a.Config() 60 » cfg := a.ServiceConfig()
61 61
62 coordCfg, acfg := cfg.GetCoordinator(), cfg.GetArchivist() 62 coordCfg, acfg := cfg.GetCoordinator(), cfg.GetArchivist()
63 switch { 63 switch {
64 case coordCfg == nil: 64 case coordCfg == nil:
65 fallthrough 65 fallthrough
66 66
67 case acfg == nil: 67 case acfg == nil:
68 return errors.New("missing required config: archivist") 68 return errors.New("missing required config: archivist")
69 case acfg.GsStagingBucket == "": 69 case acfg.GsStagingBucket == "":
70 return errors.New("missing required config: archivist.gs_staging _bucket") 70 return errors.New("missing required config: archivist.gs_staging _bucket")
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 // Entry point. 269 // Entry point.
270 func main() { 270 func main() {
271 a := application{ 271 a := application{
272 Service: service.Service{ 272 Service: service.Service{
273 Name: "archivist", 273 Name: "archivist",
274 }, 274 },
275 } 275 }
276 a.Run(context.Background(), a.runArchivist) 276 a.Run(context.Background(), a.runArchivist)
277 } 277 }
OLDNEW
« no previous file with comments | « no previous file | logdog/server/cmd/logdog_collector/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698