Versions in this module Expand all Collapse all v1 v1.0.1 Dec 21, 2016 v1.0.0 Dec 15, 2016 Changes in this version + const DefaultLeaseDuration + const DefaultRenewDeadline + const DefaultRetryPeriod + const DefaultTermLimit + const JitterFactor + type LeaderCallbacks struct + OnNewLeader func(identity string) + OnStartedLeading func(stop <-chan struct{}) + OnStoppedLeading func() + type LeaderElectionConfig struct + Callbacks LeaderCallbacks + LeaseDuration time.Duration + Lock rl.Interface + RenewDeadline time.Duration + RetryPeriod time.Duration + TermLimit time.Duration + type LeaderElector struct + func NewLeaderElector(lec LeaderElectionConfig) (*LeaderElector, error) + func (le *LeaderElector) GetLeader() string + func (le *LeaderElector) IsLeader() bool + func (le *LeaderElector) Run(task <-chan bool)