Versions in this module Expand all Collapse all v0 v0.1.0 Mar 22, 2023 Changes in this version + type Leader interface + IsLeading func() bool + Start func() + Stop func() error + func NewLeader(opts Opts) (leader Leader, onPromote <-chan time.Time, onDemote <-chan time.Time, ...) + type Opts struct + JitterMS int + Key string + Redis RedisCompatible + TTL time.Duration + Wait time.Duration + type RedisCompatible interface + EvalSha func(ctx context.Context, sha string, keys []string, args ...any) *redis.Cmd + Get func(ctx context.Context, key string) *redis.StringCmd + ScriptLoad func(ctx context.Context, script string) *redis.StringCmd