Documentation
¶
Index ¶
- Constants
- func InitGM(ipAddresses []string, dryRun bool)
- func InitPeersIPViews()
- func NewChecks(dnsConfig dns.Provider, threshold int, interval time.Duration, port int)
- func NotifyIPState(ipAddress string, live bool, peerUpdate bool) error
- func StartPingMon(threshold int)
- func StartTCPChecks(threshold int)
- func UpdateGlobalState(ipAddress string, live bool, peer string) (liveCheck int)
- type GlobalMap
- type HTTPUpdate
- type HealthTracker
Constants ¶
View Source
const ( ADD int = 1 REMOVE int = 2 )
Variables ¶
This section is empty.
Functions ¶
func InitPeersIPViews ¶
func InitPeersIPViews()
InitPeersIPViews - initialize the state of Peers' IP views to be true
func NotifyIPState ¶
NotifyIPState - notify peer agents of change in state of monitored IP
func StartPingMon ¶
func StartPingMon(threshold int)
StartPingMon to initialize and start ping monitor
func StartTCPChecks ¶
func StartTCPChecks(threshold int)
StartTCPChecks to run the registered tcp based health checks in separate goroutines
Types ¶
type GlobalMap ¶
type GlobalMap struct { IPLive map[string]bool // true if an IP is still alive and false otherwise MinAgreement int Mutex *sync.RWMutex Peers []string LocalAddr string Clustered bool Members *quorums.MemList DryRun bool CryptoKey string Type string Dmutex *dmutex.Dmutex // contains filtered or unexported fields }
GlobalMap struct for managing network of monitoring agents and monitored IPs
var Gm *GlobalMap
Gm var for the global map of monitored IPs
type HTTPUpdate ¶
HTTPUpdate to manage peer monitoring agent updates
type HealthTracker ¶
type HealthTracker struct { Results map[string]*response P *fastping.Pinger TCPChecks map[string]string AddressFails map[string]int AddressSuccesses map[string]int DNS dns.Provider Mutex *sync.RWMutex Interval time.Duration }
HealthTracker struct to manage monitoring agent context
var Master *HealthTracker
Master pinger
Click to show internal directories.
Click to hide internal directories.