Versions in this module Expand all Collapse all v0 v0.1.0 Mar 8, 2026 Changes in this version + func FormatStats(s Stats) string + func Hostname() string + type Cluster struct + func Run(ctx context.Context, cfg Config) (*Cluster, error) + func (cl *Cluster) Close() error + func (cl *Cluster) GetStats(ctx context.Context) (Stats, error) + func (cl *Cluster) IsLeader() bool + func (cl *Cluster) NodeInfo() NodeInfo + func (cl *Cluster) Revision() int64 + func (cl *Cluster) Wait() + type Config struct + LeaseTTL time.Duration + Logger *slog.Logger + MaxDrift time.Duration + NodeID string + NodePriority int + OnStart func(ctx context.Context) error + OnStop func() + Project string + RedisOptions *redis.Options + RedisURL string + Strategy Strategy + TickInterval time.Duration + type Event struct + Action string + NodeID string + Timestamp time.Time + type LiveNode struct + IsLeader bool + LastSeen time.Time + NodeID string + Priority int + type NodeInfo struct + IsLeader bool + NodeID string + Priority int + Project string + Revision int64 + type Stats struct + CurrentLeader string + CurrentRevision int64 + LiveNodes []LiveNode + Project string + RecentEvents []Event + type Strategy int + const Priority + const Race