const defaultLeaseDuration …
const defaultRenewDeadline …
const defaultRetryPeriod …
const defaultHealthCheckTimeout …
const HealthCheckerAddress …
type leaderElection …
type Option …
func New(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context), opts ...Option) *leaderElection { … }
func Identity(identity string) Option { … }
func Namespace(namespace string) Option { … }
func LeaseDuration(leaseDuration time.Duration) Option { … }
func RenewDeadline(renewDeadline time.Duration) Option { … }
func RetryPeriod(retryPeriod time.Duration) Option { … }
func HealthCheckTimeout(timeout time.Duration) Option { … }
func Context(ctx context.Context) Option { … }
type Server …
func (l *leaderElection) PrepareHealthCheck(s Server) { … }
func (l *leaderElection) Run() error { … }
func defaultLeaderElectionIdentity() (string, error) { … }
func sanitizeName(name string) string { … }
func inClusterNamespace() string { … }
func adaptCheckToHandler(c func(r *http.Request) error) http.HandlerFunc { … }