Versions in this module Expand all Collapse all v0 v0.2.0 Oct 13, 2026 Changes in this version + const RetryPeriod + var ErrClosed = errors.New("coord: coordinator closed") + var ErrHeld = errors.New("coord: lease held") + var ErrLost = errors.New("coord: lease lost") + func RunElected(ctx context.Context, c Coordinator, name string, retry time.Duration, ...) error + type Coordinator interface + Close func(ctx context.Context) error + TryAcquire func(ctx context.Context, name string) (Term, error) + type Local struct + func NewLocal() *Local + func (l *Local) Close(context.Context) error + func (l *Local) Held(ctx context.Context, name string) (bool, error) + func (l *Local) Peer() *Local + func (l *Local) TryAcquire(ctx context.Context, name string) (Term, error) + type Observer interface + Held func(ctx context.Context, name string) (bool, error) + type Term interface + Done func() <-chan struct{} + Err func() error + Name func() string + Resign func(ctx context.Context) error + Token func() uint64