leaderelection

package
Version: v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElectionParticipant

type ElectionParticipant interface {
	IsLeader() bool
}

ElectionParticipant partakes in leader election to become leader.

func NewElectionParticipant

func NewElectionParticipant(lock dl.Lock, resourceName string, options ElectionParticipantOptions) ElectionParticipant

NewElectionParticipant returns a ElectionParticipant which attempts to become leader.

type ElectionParticipantOptions

type ElectionParticipantOptions struct {
	LeaderLeaseRefreshInterval   time.Duration
	FollowerLeaseRefreshInterval time.Duration
	Logger                       *zap.Logger
}

ElectionParticipantOptions control behavior of the election participant. TODO func applyDefaults(), parameter error checking, etc.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to