zood/structs.go

26 lines
782 B
Go
Raw Permalink Normal View History

2025-02-15 12:30:07 -06:00
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
2024-11-15 01:22:47 -06:00
package main
2024-11-15 18:11:52 -06:00
import (
"time"
2025-02-15 12:16:27 -06:00
"go.wit.com/lib/protobuf/forgepb"
2025-02-22 07:17:28 -06:00
"go.wit.com/lib/protobuf/zoopb"
2024-11-15 18:11:52 -06:00
)
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 {
2025-02-22 07:17:28 -06:00
urlbase string // the dns name for the zookeeper
hostname string // my hostname
pollDelay time.Duration // how often to report our status
dog *time.Ticker // the watchdog timer
machine *zoopb.Machine // populated from protobuf based zoopb
2025-02-15 12:16:27 -06:00
forge *forgepb.Forge // handle to forge
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
}