leaderelection

package
v1.11.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeaderElection

type LeaderElection struct {
	// contains filtered or unexported fields
}

LeaderElection is a convenience wrapper around client-go's leader election library.

func NewLeaderElection

func NewLeaderElection(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection

NewLeaderElection returns the default & preferred leader election type

func NewLeaderElectionWithConfigMaps

func NewLeaderElectionWithConfigMaps(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection

NewLeaderElectionWithConfigMaps returns an implementation of leader election using ConfigMaps

func NewLeaderElectionWithEndpoints

func NewLeaderElectionWithEndpoints(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection

NewLeaderElectionWithEndpoints returns an implementation of leader election using Endpoints

func NewLeaderElectionWithLeases

func NewLeaderElectionWithLeases(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection

NewLeaderElectionWithLeases returns an implementation of leader election using Leases

func (*LeaderElection) Run

func (l *LeaderElection) Run() error

Run starts the leader loop

func (*LeaderElection) WithIdentity

func (l *LeaderElection) WithIdentity(identity string)

WithIdentity ...

func (*LeaderElection) WithLeaseDuration

func (l *LeaderElection) WithLeaseDuration(leaseDuration time.Duration)

WithLeaseDuration ...

func (*LeaderElection) WithNamespace

func (l *LeaderElection) WithNamespace(namespace string)

WithNamespace ...

func (*LeaderElection) WithRenewDeadline

func (l *LeaderElection) WithRenewDeadline(renewDeadline time.Duration)

WithRenewDeadline ...

func (*LeaderElection) WithRetryPeriod

func (l *LeaderElection) WithRetryPeriod(retryPeriod time.Duration)

WithRetryPeriod ...

Jump to

Keyboard shortcuts

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