Documentation ¶
Overview ¶
Package health check provides a library to run a new gRPC server that implements the gRPC Health Check Protocol. This is intended to be used by our tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server represents the gRPC health checkable server. The address the server is listening on can be extracted from this struct.
func NewServer ¶
NewServer creates a new server but does not start it. This sets up the listening address and the initial health.
func (*Server) StartServer ¶
StartServer starts the gRPC server with two durations. StartTime is the amount of time it takes to actually start serving the endpoints. HealthyTime is the amount of time it takes for the service to be considered healthy.
Example: startTime = 2 sec, healthyTime = 3 sec
Tick 0: Server not running Tick 1: Server not running Tick 2: Server running but unhealthy Tick 3: Server running and healthy
func (*Server) StopServer ¶
func (s *Server) StopServer()