Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLeading ¶
func SetLeading(leading bool)
func Subscribe ¶
func Subscribe(client kubernetes.Interface, name string) (<-chan bool, error)
Subscribe starts the leader election process if not already started and returns a channel subscriber can listen on for election results
func Unsubscribe ¶
func Unsubscribe(name string)
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages the pausing and resumption of a given system based on changes in leadership
func NewManager ¶
func NewManager(system Resumer, name string, kubeClient kubernetes.Interface) *Manager
NewManager creates a new leadership manager for a given system
Click to show internal directories.
Click to hide internal directories.