Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewElection ¶
func NewElection(electionId, id, namespace string, ttl time.Duration, callback func(leader string), c client.Interface) (*leaderelection.LeaderElector, error)
NewElection creates an election. 'namespace'/'election' should be an existing Kubernetes Service 'id' is the id if this leader, should be unique.
func NewSimpleElection ¶
func NewSimpleElection(electionId, id string, callback func(leader string), c client.Interface) (*leaderelection.LeaderElector, error)
NewSimpleElection creates an election, it defaults namespace to 'default' and ttl to 10s
func RunElection ¶
func RunElection(e *leaderelection.LeaderElector)
RunElection runs an election given an leader elector. Doesn't return.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.