healthhttp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 4 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 {
	// contains filtered or unexported fields
}

Server provides a simple HTTP health check endpoint for GCE load balancers. This runs alongside the gRPC server to provide HTTP-based health checks which are more reliable with GKE NEG configurations than HTTP/2 gRPC health checks.

func NewServer

func NewServer(port string, logger *slog.Logger) *Server

NewServer creates a new HTTP health check server. It listens on the specified port and responds to all requests with 200 OK.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the HTTP server.

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP health server. Blocks until server stops.

Jump to

Keyboard shortcuts

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