elect

package
v0.11.15 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComponent

func NewComponent() *electorComponent

Types

type CallbackPhase

type CallbackPhase int
const (
	CallbackPhasePostStarted CallbackPhase = 1
	CallbackPhasePostStopped CallbackPhase = 2
)

type LeaderElectCallback

type LeaderElectCallback func(CallbackPhase)

type LeaderElector

type LeaderElector interface {
	Start(stop <-chan struct{})
	IsLeader() bool
	AddCallbacks(...LeaderElectCallback)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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