package health

import "google.golang.org/grpc/health"

Package health provides a service that exposes server's health and it must be imported to enable support for client-side health checks.

Index

Types

type Server

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

Server implements `service Health`.

func NewServer

func NewServer() *Server

NewServer returns a new Server.

func (*Server) Check

Check implements `service Health`.

func (*Server) SetServingStatus

func (s *Server) SetServingStatus(service string, servingStatus 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.

func (*Server) Watch

Watch implements `service Health`.

Source Files

client.go server.go

Directories

PathSynopsis
health/grpc_health_v1
Version
v1.17.0
Published
Dec 4, 2018
Platform
linux/amd64
Imports
11 packages
Last checked
22 minutes ago

Tools for package owners.