Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

health

v1.14.0
github.com/bglmmz/grpc/health

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

5 matches

Top ↑

Package health provides some utility functions to health-check a server. The implementation is based on protobuf. Users need to write their own implementations if other IDLs are used.

Types

Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements `service Health`.

NewServer

func NewServer() *Server

NewServer returns a new Server.

Server.Check

func (s *Server) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)

Check implements `service Health`.

Server.SetServingStatus

func (s *Server) SetServingStatus(service string, status healthpb.HealthCheckResponse_ServingStatus)

SetServingStatus is called when need to reset the serving status of a service or insert a new service entry into the statusMap.

Dependency graph