health

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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.

See original source: https://github.com/grpc/grpc-go/blob/master/health/health.go

We use our own implementation of grpc server health check to include the authorization wrapper necessary for the Managers.

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 represents a Health Check server to check if a service is running or not on some host.

func NewHealthServer

func NewHealthServer() *Server

NewHealthServer creates a new health check server for grpc services.

func (*Server) Check

Check checks if the grpc server is healthy and running.

func (*Server) SetServingStatus

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

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

Jump to

Keyboard shortcuts

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