type HealthzAdaptor … // Name returns the name of the health check we are implementing. func (l *HealthzAdaptor) Name() string { … } // Check is called by the healthz endpoint handler. // It fails (returns an error) if we own the lease but had not been able to renew it. func (l *HealthzAdaptor) Check(req *http.Request) error { … } // SetLeaderElection ties a leader election object to a HealthzAdaptor func (l *HealthzAdaptor) SetLeaderElection(le *LeaderElector) { … } // NewLeaderHealthzAdaptor creates a basic healthz adaptor to monitor a leader election. // timeout determines the time beyond the lease expiry to be allowed for timeout. // checks within the timeout period after the lease expires will still return healthy. func NewLeaderHealthzAdaptor(timeout time.Duration) *HealthzAdaptor { … }