const controllerName …
const defaultRequeueInterval …
const noRequeue …
const defaultLeaseDurationSeconds …
const electionDuration …
const leaseCandidateValidDuration …
type Controller …
func (c *Controller) Run(ctx context.Context, workers int) { … }
func NewController(leaseInformer coordinationv1informers.LeaseInformer, leaseCandidateInformer coordinationv1alpha1.LeaseCandidateInformer, leaseClient coordinationv1client.CoordinationV1Interface, leaseCandidateClient coordinationv1alpha1client.CoordinationV1alpha1Interface) (*Controller, error) { … }
func (c *Controller) runElectionWorker(ctx context.Context) { … }
func (c *Controller) processNextElectionItem(ctx context.Context) bool { … }
func (c *Controller) enqueueCandidate(obj any) { … }
func (c *Controller) enqueueLease(obj any) { … }
func (c *Controller) electionNeeded(candidates []*v1alpha1.LeaseCandidate, leaseNN types.NamespacedName) (bool, error) { … }
func (c *Controller) reconcileElectionStep(ctx context.Context, leaseNN types.NamespacedName) (requeue time.Duration, err error) { … }
func (c *Controller) listAdmissableCandidates(leaseNN types.NamespacedName) ([]*v1alpha1.LeaseCandidate, error) { … }