File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import (
20
20
// read the configuration file(s) from the repository, gather all the targets
21
21
// and set up the target watcher. This should always happen in sync with the
22
22
// rest of the service to prevent a reconfiguration during an event handler.
23
- func (w * Watcher ) reconfigure (hostname string ) (err error ) {
23
+ func (w * Watcher ) reconfigure () (err error ) {
24
24
zap .L ().Debug ("reconfiguring" )
25
25
26
26
err = w .watchConfig ()
@@ -35,7 +35,7 @@ func (w *Watcher) reconfigure(hostname string) (err error) {
35
35
}
36
36
state := getNewState (
37
37
filepath .Join (w .directory , path ),
38
- hostname ,
38
+ w . hostname ,
39
39
w .state ,
40
40
)
41
41
Original file line number Diff line number Diff line change @@ -52,14 +52,14 @@ func New(
52
52
}
53
53
54
54
func (w * Watcher ) Start () error {
55
- if err := w .reconfigure (w . hostname ); err != nil {
55
+ if err := w .reconfigure (); err != nil {
56
56
return err
57
57
}
58
58
59
59
f := func () (err error ) {
60
60
select {
61
61
case <- w .configWatcher .Events :
62
- err = w .reconfigure (w . hostname )
62
+ err = w .reconfigure ()
63
63
64
64
case event := <- w .targetsWatcher .Events :
65
65
if e := w .handle (event ); e != nil {
You can’t perform that action at this time.
0 commit comments