lib

package
v0.0.0-...-34322f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL