leaderelection

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 50

Documentation

Index

Constants

View Source
const (
	DefaultHealthCheckTimeout = 20 * time.Second

	// HealthCheckerAddress is the address at which the leader election health
	// checker reports status.
	// The caller sidecar should document this address in appropriate flag
	// descriptions.
	HealthCheckerAddress = "/healthz/leader-election"
)

Variables

This section is empty.

Functions

func NewLeaderElection

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

NewLeaderElection returns the default & preferred leader election type

func NewLeaderElectionWithLeases

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

NewLeaderElectionWithLeases returns an implementation of leader election using Leases

Types

type Server added in v0.9.0

type Server interface {
	Handle(pattern string, handler http.Handler)
}

Server represents any type that could serve HTTP requests for the leader election health check endpoint.

Jump to

Keyboard shortcuts

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