leaderelection

package
v0.17.9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidateConfig = kle.NewConfigFromConfigMap

Functions

func WithStandardLeaderElectorBuilder added in v0.16.0

func WithStandardLeaderElectorBuilder(ctx context.Context, kc kubernetes.Interface, cc pkgleaderelection.ComponentConfig) context.Context

WithStandardLeaderElectorBuilder infuses a context with the ability to build LeaderElectors with the provided component configuration acquiring resource locks via the provided kubernetes client

Types

type Adapter added in v0.16.0

type Adapter interface {
	Start(ctx context.Context) error
}

Adapter is the interface for running adapter

type Elector added in v0.16.0

type Elector interface {
	Run(context.Context)
}

Elector is the interface for running a leader elector.

func BuildAdapterElector added in v0.16.0

func BuildAdapterElector(ctx context.Context, adapter Adapter) (Elector, error)

BuildAdapterElector builds a leaderelection.LeaderElector for the given adapter using a builder added to the context via WithXXLeaderElectorBuilder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳