Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvoyFilterController = "aeraki-envoyfilter-controller-election" AllocateVIPController = "aeraki-service-entry-vip-allocation-controller-election" )
Various locks used throughout the code
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeaderElection ¶
type LeaderElection struct {
// contains filtered or unexported fields
}
LeaderElection is used for controller leader election
func NewLeaderElection ¶
func NewLeaderElection(namespace, name, electionID string, client kubernetes.Interface) *LeaderElection
NewLeaderElection creates a new LeaderElection
func (*LeaderElection) AddRunFunction ¶
func (l *LeaderElection) AddRunFunction(f func(stop <-chan struct{})) *LeaderElection
AddRunFunction registers a function to run when we are the leader. These will be run asynchronously. To avoid running when not a leader, functions should respect the stop channel.
func (*LeaderElection) Run ¶
func (l *LeaderElection) Run(stop <-chan struct{})
Run will start leader election, calling all runFns when we become the leader.
Click to show internal directories.
Click to hide internal directories.