Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(name string, leaderElectionClient kubernetes.Interface, recorder resourcelock.EventRecorder, callbacks leaderelection.LeaderCallbacks) (*leaderelection.LeaderElector, error)
New returns a new leader elector which uses the "hostname + name" as lock identity
func RunAsLeader ¶
func RunAsLeader(ctx context.Context, log *zap.SugaredLogger, cfg *rest.Config, recorder resourcelock.EventRecorder, leaderName string, callback func(context.Context) error) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.