election

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg Config)

Run creates and runs a new leader election

Types

type Config

type Config struct {
	LockType      string
	LockName      string
	LockNamespace string
	RetryPeriod   time.Duration
	LeaseDuration time.Duration
	RenewDeadline time.Duration
	Callback      func(leader string)
}

Jump to

Keyboard shortcuts

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