Versions in this module Expand all Collapse all v1 v1.0.0 May 27, 2022 Changes in this version + type Election interface + Campaign func(ctx context.Context, val string) error + Leader func(ctx context.Context) (*clientv3.GetResponse, error) + Observe func(ctx context.Context) <-chan clientv3.GetResponse + Proclaim func(ctx context.Context, val string) error + Resign func(ctx context.Context) (err error) + type Embedded struct + ETCD *embed.Etcd + func (embd *Embedded) CleanDs() + func (embd *Embedded) Client() *clientv3.Client + func (embd *Embedded) Start(t *testing.T) + func (embd *Embedded) Stop() + type EventsWatcher interface + OnGainedLeadership func() + OnLostLeadership func() + type Service struct + func New(etcdClient *clientv3.Client, logger *zap.Logger, instanceName string, ...) (*Service, error) + func (l *Service) Resign(ctx context.Context) error + func (l *Service) Start(ctx context.Context) error + func (l *Service) Stop(ctx context.Context) error