Versions in this module Expand all Collapse all v0 v0.6.1 Dec 4, 2017 v0.6.0 Nov 8, 2017 Changes in this version + const JitterFactor + type Config struct + Callbacks LeaderCallbacks + LeaseDuration time.Duration + Lock rl.Interface + RenewDeadline time.Duration + RetryPeriod time.Duration + TermLimit time.Duration + type LeaderCallbacks struct + OnNewLeader func(identity string) + OnStartedLeading func(stop <-chan struct{}) + OnStoppedLeading func() + type LeaderElector struct + func NewLeaderElector(lec Config) (*LeaderElector, error) + func (le *LeaderElector) GetLeader() string + func (le *LeaderElector) IsLeader() bool + func (le *LeaderElector) Run(task <-chan bool)