leaderelection

package
v0.0.0-...-430ebb6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(
	client v1.CoordinationV1Interface,
	lockName string,
	namespace string,
	identity string,
	leaseDuration time.Duration,
	renewDeadline time.Duration,
	retryPeriod time.Duration,
	releaseOnCancel bool,
) *Client

func (*Client) RegisterOnNew

func (c *Client) RegisterOnNew(callback func(currentID string, lockID string)) *Client

func (*Client) RegisterOnStart

func (c *Client) RegisterOnStart(callback func(c context.Context)) *Client

func (*Client) RegisterOnStop

func (c *Client) RegisterOnStop(callback func()) *Client

func (*Client) Run

func (c *Client) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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