Documentation ¶
Index ¶
- Constants
- type Server
- func (hs *Server) Alive() bool
- func (hs *Server) HandleLiveness(responseWriter http.ResponseWriter, request *http.Request)
- func (hs *Server) HandleReadiness(responseWriter http.ResponseWriter, request *http.Request)
- func (hs *Server) SetAlive(isAlive bool)
- func (hs *Server) Shutdown()
- func (hs *Server) Start(logger *zap.Logger) error
- func (hs *Server) Stop(logger *zap.Logger)
- type Status
Constants ¶
View Source
const ( // Default Health Configuration LivenessPath = "/healthz" // The Endpoint Of The Liveness Check ReadinessPath = "/healthy" // The Endpoint Of The Readiness Check )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { HttpPort string // The HTTP Port The Dispatcher Server Listens On // contains filtered or unexported fields }
Structure Containing Basic Liveness Information For Health Server
func NewHealthServer ¶
Creates A New Server With Specified Configuration
func (*Server) HandleLiveness ¶
func (hs *Server) HandleLiveness(responseWriter http.ResponseWriter, request *http.Request)
HTTP Request Handler For Liveness Requests (/healthz)
func (*Server) HandleReadiness ¶
func (hs *Server) HandleReadiness(responseWriter http.ResponseWriter, request *http.Request)
HTTP Request Handler For Readiness Requests (/healthy)
func (*Server) Shutdown ¶
func (hs *Server) Shutdown()
Set All Liveness And Readiness Flags To False
Click to show internal directories.
Click to hide internal directories.