Versions in this module Expand all Collapse all v0 v0.1.1 Aug 22, 2022 v0.1.0 Aug 22, 2022 Changes in this version + type ChannelEvent struct + Ch chan<- NodeEvent + func (c *ChannelEvent) NotifyDead(n Node) + func (c *ChannelEvent) NotifyLive(n Node) + func (c *ChannelEvent) NotifyUpdate(n Node) + type Config struct + ClusterID string + EnableCompression bool + Events NotifyEvent + FailureDetectorConfig *FailureDetectorConfig + GossipInterval time.Duration + GossipNodes int + ListenAddr string + Logger *log.Logger + Node Node + SecretKey []byte + func DefaultLANConfig() *Config + func DefaultWANConfig() *Config + type FailureDetectorConfig struct + AcceptableHeartbeatPause time.Duration + DeadNodeGracePeriod time.Duration + FirstHeartbeatEstimate time.Duration + MinStdDeviation time.Duration + PhiThreshold float64 + SamplingWindowSize uint + func FailureDetectorDefaultConfig() *FailureDetectorConfig + type Node struct + GossipPublicAddress string + ID string + type NodeEvent struct + Event NodeEventType + Node Node + type NodeEventType int + const NodeDead + const NodeLive + const NodeUpdate + type NotifyEvent interface + NotifyDead func(Node) + NotifyLive func(Node) + NotifyUpdate func(Node) + type Scuttlebutt struct + func NewScuttlebutt(config *Config, metadata map[string]string) (*Scuttlebutt, error) + func (sb *Scuttlebutt) Join(seedNodes []string) error + func (sb *Scuttlebutt) Set(key, value string) error + func (sb *Scuttlebutt) Shutdown() error + func (sb *Scuttlebutt) State() *State + type State struct + func (s *State) Get(node Node, key string) (string, bool) + func (s *State) GetAll(node Node) map[string]string + func (s *State) GetDeadNodes() []Node + func (s *State) GetLiveNodes() []Node + func (s *State) SeedNodes() []string