Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Context context.Context Identity string LockNamespace string LockName string LeaseDuration time.Duration RenewDeadline time.Duration RetryPeriod time.Duration }
Config defines a generic configuration for managing leader election.
type Leader ¶
type Leader struct {
// contains filtered or unexported fields
}
Leader encapsulates logic for tracking the current leader.
func NewLeader ¶
func NewLeader() *Leader
NewLeader constructs a leader to be used along with a proxy.Server.
Click to show internal directories.
Click to hide internal directories.