istio: istio.io/istio/pilot/pkg/leaderelection Index | Files

package leaderelection

import "istio.io/istio/pilot/pkg/leaderelection"

Index

Package Files

leaderelection.go

Constants

const (
    NamespaceController  = "istio-namespace-controller-election"
    ValidationController = "istio-validation-controller-election"
    // This holds the legacy name to not conflict with older control plane deployments which are just
    // doing the ingress syncing.
    IngressController = "istio-leader"
    StatusController  = "istio-status-leader"
    AnalyzeController = "istio-analyze-leader"
)

Various locks used throughout the code

type LeaderElection Uses

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

func NewLeaderElection Uses

func NewLeaderElection(namespace, name, electionID string, client kubernetes.Interface) *LeaderElection

func (*LeaderElection) AddRunFunction Uses

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 Uses

func (l *LeaderElection) Run(stop <-chan struct{})

Run will start leader election, calling all runFns when we become the leader.

Package leaderelection imports 8 packages (graph) and is imported by 4 packages. Updated 2020-09-30. Refresh now. Tools for package owners.