Versions in this module Expand all Collapse all v0 v0.0.2 Jun 11, 2021 v0.0.1 Jun 11, 2021 Changes in this version + func Chroot(path string) error + func CurRoot() string + type ElectionCallback func(*Elector) + type Elector struct + ElectionName string + IsLeader bool + IsRunning bool + Me string + func NewElector(electionName string, me string, onElectedCallback ElectionCallback) (*Elector, error) + func (el *Elector) Resign() + func (el *Elector) StopElection() + type Heartbeat struct + ServiceName string + func RegisterHeartbeat(serviceName string, timeout time.Duration, regData string, ...) (*Heartbeat, error) + func (hb *Heartbeat) Disconnect() + func (hb *Heartbeat) GetMates() []string + type HeartbeatEventCallback func(string, string) + type Mutex struct + Name string + func NewMutex(lockName string) (*Mutex, error) + func (l *Mutex) Lock() error + func (l *Mutex) Unlock() error