healthz

package
v1.12.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// LeaderHealthzAdaptor is public so that it can be retrieved by the caller
	// and used as the value for `LeaderElectionConfig.Watchdog` when
	// initializing the LeaderElector.
	LeaderHealthzAdaptor *leaderelection.HealthzAdaptor
	// contains filtered or unexported fields
}

Server responds to HTTP requests to a /livez endpoint and responds with an error if the LeaderElector has exited or has not observed the LeaderElectionRecord for a given amount of time.

func NewServer

func NewServer(leaderElectionHealthzAdaptorTimeout time.Duration) *Server

NewServer creates a new healthz.Server. The supplied leaderElectionHealthzAdaptorTimeout controls how long after the leader lease time, the leader election will be considered to have failed.

func (*Server) Start

func (o *Server) Start(ctx context.Context, l net.Listener) error

Start makes the server listen on the supplied socket, until the supplied context is cancelled, after which the server will gracefully shutdown and Start will exit. The server is given 5 seconds to shutdown gracefully.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL