Versions in this module Expand all Collapse all v0 v0.1.0 Jun 15, 2023 Changes in this version + func GetLeader(c *clientv3.Client, leaderPath string) (*pdpb.Member, int64, error) + type Leadership struct + func NewLeadership(client *clientv3.Client, leaderKey, purpose string) *Leadership + func (ls *Leadership) Campaign(leaseTimeout int64, leaderData string, cmps ...clientv3.Cmp) error + func (ls *Leadership) Check() bool + func (ls *Leadership) DeleteLeaderKey() error + func (ls *Leadership) GetClient() *clientv3.Client + func (ls *Leadership) GetLeaderKey() string + func (ls *Leadership) Keep(ctx context.Context) + func (ls *Leadership) LeaderTxn(cs ...clientv3.Cmp) clientv3.Txn + func (ls *Leadership) Reset() + func (ls *Leadership) Watch(serverCtx context.Context, revision int64)