konductor

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KonductorElection

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

func NewKonductorElection

func NewKonductorElection(
	kube *kubeclient.Kubeclient,
	event *event.Event,
	run func(context.Context),
	onElected func(konductor string),
	opts Options,
) *KonductorElection

func (*KonductorElection) Konductor

func (ko *KonductorElection) Konductor() string

Konductor returns the instance that won the konductor election

func (*KonductorElection) Name

func (ko *KonductorElection) Name() string

func (*KonductorElection) Shutdown

func (ko *KonductorElection) Shutdown(ctx context.Context)

func (*KonductorElection) Start

func (ko *KonductorElection) Start(ctx context.Context) error

func (*KonductorElection) Started

func (ko *KonductorElection) Started() bool

type Options

type Options struct {
	LeaseDuration time.Duration
	RetryPeriod   time.Duration
	RenewDeadline time.Duration

	Namespace   string
	Labels      map[string]string
	Annotations map[string]string
}

Jump to

Keyboard shortcuts

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