quorum

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeaderChangeCallback

type LeaderChangeCallback func(isLeader bool)

type LeaderElection

type LeaderElection interface {
	Start(ctx context.Context) error
	Stop() error
	IsLeader() bool
}

func NewNoLeaderElection

func NewNoLeaderElection(callback LeaderChangeCallback) LeaderElection

func NewRaftLeaderElection

func NewRaftLeaderElection(callback LeaderChangeCallback) LeaderElection

type LeaderElectionFactory

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

func NewLeaderElectionFactory

func NewLeaderElectionFactory() *LeaderElectionFactory

func (*LeaderElectionFactory) Build

func (f *LeaderElectionFactory) Build(leaderElectionConfig config.LeaderElectionConfig) LeaderElection

func (*LeaderElectionFactory) OnLeaderChange

Jump to

Keyboard shortcuts

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