healthz

package
v1.16.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClockHealthAdaptor added in v1.14.0

func NewClockHealthAdaptor(c clock.Clock) *clockHealthAdaptor

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