healthcheck

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register() *services.ServiceInfo

Register func registers healthCheck service

Types

type HealthServer

type HealthServer interface {
	Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
	Watch(in *healthpb.HealthCheckRequest, stream healthgrpc.Health_WatchServer) error
	SetServingStatus(service string, servingStatus healthpb.HealthCheckResponse_ServingStatus)
	Shutdown()
	Resume()
}

HealthServer interface

func FromContext

func FromContext(ctx context.Context) (HealthServer, error)

FromContext returns grpc_health_v1.HealthServer from service init context wrapped in context.Context

func FromInitContext

func FromInitContext(init *services.InitContext) (HealthServer, error)

FromInitContext returns HealthServer from service init context

Jump to

Keyboard shortcuts

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