election

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client     clientset.Interface
	ElectionID string
	Callbacks  leaderelection.LeaderCallbacks
	Logger     logrus.FieldLogger
}

Config holds the configuration for a leader election

type Elector

type Elector interface {
	Run(context.Context)
	IsLeader() bool
}

Elector elects a leader in a cluster.

func NewElector

func NewElector(ctx context.Context, config Config) Elector

NewElector returns an instance of Elector based on config.

Jump to

Keyboard shortcuts

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