Documentation ¶
Overview ¶
Package health contains logic and helper functions for determining whether a RobustIRC network is healthy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectStatuses ¶
func CollectStatuses(servers []string, networkPassword string) (map[string]ServerStatus, error)
func EnsureNetworkHealthy ¶
func EnsureNetworkHealthy(servers []string, networkPassword string) (map[string]ServerStatus, error)
EnsureNetworkHealthy returns nil when all of the following is true:
- all nodes are reachable
- all nodes return the same leader
- all nodes are either follower or leader (i.e. not candidate/initializing)
- all follower nodes were recently contacted by the leader
func ResolveNetwork ¶
Types ¶
type ServerStatus ¶
type ServerStatus struct { Server string State string Leader string Peers []string AppliedIndex uint64 CommitIndex uint64 LastContact time.Time ExecutableHash string CurrentTime time.Time }
func GetServerStatus ¶
func GetServerStatus(server, networkPassword string) (ServerStatus, error)
Click to show internal directories.
Click to hide internal directories.