2024-11-15 01:22:47 -06:00
|
|
|
package main
|
|
|
|
|
2024-11-15 18:11:52 -06:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"go.wit.com/lib/protobuf/zoopb"
|
|
|
|
)
|
2024-11-15 09:12:08 -06:00
|
|
|
|
2024-11-15 01:22:47 -06:00
|
|
|
var me *stuff
|
|
|
|
|
|
|
|
// this app's variables
|
|
|
|
type stuff struct {
|
2024-11-21 19:48:09 -06:00
|
|
|
urlbase string // the dns name for the zookeeper
|
|
|
|
pollDelay time.Duration // how often to report our status
|
|
|
|
dog *time.Ticker // the watchdog timer
|
|
|
|
machine zoopb.Machine // populated from protobuf based zoopb
|
|
|
|
failcount int // how many times we've failed to contact the zookeeper
|
|
|
|
failcountmax int // after this, exit and let systemd restart the daemon
|
2024-11-15 01:22:47 -06:00
|
|
|
}
|