new init()
This commit is contained in:
parent
1d7b1efa27
commit
c0dd5772b0
2
main.go
2
main.go
|
@ -9,7 +9,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.wit.com/dev/alexflint/arg"
|
"go.wit.com/dev/alexflint/arg"
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
|
||||||
"go.wit.com/lib/protobuf/zoopb"
|
"go.wit.com/lib/protobuf/zoopb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -44,7 +43,6 @@ func main() {
|
||||||
me.pollDelay = 3 * time.Second
|
me.pollDelay = 3 * time.Second
|
||||||
me.failcountmax = 20 // die every minute if zookeeper can't be found
|
me.failcountmax = 20 // die every minute if zookeeper can't be found
|
||||||
|
|
||||||
me.forge = forgepb.InitPB()
|
|
||||||
me.machine = zoopb.InitMachine()
|
me.machine = zoopb.InitMachine()
|
||||||
|
|
||||||
zood() // talks to zookeeper
|
zood() // talks to zookeeper
|
||||||
|
|
|
@ -6,7 +6,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
|
||||||
"go.wit.com/lib/protobuf/zoopb"
|
"go.wit.com/lib/protobuf/zoopb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -19,7 +18,6 @@ type stuff struct {
|
||||||
pollDelay time.Duration // how often to report our status
|
pollDelay time.Duration // how often to report our status
|
||||||
dog *time.Ticker // the watchdog timer
|
dog *time.Ticker // the watchdog timer
|
||||||
machine *zoopb.Machine // populated from protobuf based zoopb
|
machine *zoopb.Machine // populated from protobuf based zoopb
|
||||||
forge *forgepb.Forge // handle to forge
|
|
||||||
failcount int // how many times we've failed to contact the zookeeper
|
failcount int // how many times we've failed to contact the zookeeper
|
||||||
failcountmax int // after this, exit and let systemd restart the daemon
|
failcountmax int // after this, exit and let systemd restart the daemon
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue