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

Side by Side Diff: logdog/client/cmd/logdog_butler/output_logdog.go

Issue 2456673003: Butler: export Coordinator host in environment. (Closed)
Patch Set: Relieve suspense. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 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/clock/clockflag" 10 "github.com/luci/luci-go/common/clock/clockflag"
11 "github.com/luci/luci-go/common/errors" 11 "github.com/luci/luci-go/common/errors"
12 "github.com/luci/luci-go/common/flag/multiflag" 12 "github.com/luci/luci-go/common/flag/multiflag"
13 "github.com/luci/luci-go/logdog/client/butler/output" 13 "github.com/luci/luci-go/logdog/client/butler/output"
14 out "github.com/luci/luci-go/logdog/client/butler/output/logdog" 14 out "github.com/luci/luci-go/logdog/client/butler/output/logdog"
15 ) 15 )
16 16
17 func init() { 17 func init() {
18 registerOutputFactory(new(logdogOutputFactory)) 18 registerOutputFactory(new(logdogOutputFactory))
19 } 19 }
20 20
21 type coordinatorHostOutput interface {
22 getCoordinatorHost() string
23 }
24
21 // logdogOutputFactory for publishing logs using a LogDog Coordinator host. 25 // logdogOutputFactory for publishing logs using a LogDog Coordinator host.
22 type logdogOutputFactory struct { 26 type logdogOutputFactory struct {
23 host string 27 host string
24 prefixExpiration clockflag.Duration 28 prefixExpiration clockflag.Duration
25 29
26 track bool 30 track bool
27 } 31 }
28 32
29 var _ outputFactory = (*logdogOutputFactory)(nil) 33 var _ outputFactory = (*logdogOutputFactory)(nil)
30 34
(...skipping 28 matching lines...) Expand all
59 PrefixExpiration: time.Duration(f.prefixExpiration), 63 PrefixExpiration: time.Duration(f.prefixExpiration),
60 SourceInfo: []string{ 64 SourceInfo: []string{
61 "LogDog Butler", 65 "LogDog Butler",
62 }, 66 },
63 PublishContext: a.ncCtx, 67 PublishContext: a.ncCtx,
64 Track: f.track, 68 Track: f.track,
65 } 69 }
66 return cfg.Register(a) 70 return cfg.Register(a)
67 } 71 }
68 72
69 func (f *logdogOutputFactory) scopes() []string { return out.Scopes() } 73 func (f *logdogOutputFactory) scopes() []string { return out.Scopes() }
74 func (f *logdogOutputFactory) getCoordinatorHost() string { return f.host }
OLDNEW
« no previous file with comments | « logdog/client/cmd/logdog_butler/main.go ('k') | logdog/client/cmd/logdog_butler/subcommand_run.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698