health

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrHealthServiceAlreadyRegistered = bg.Error("health service already registered")
	ErrUnregisteredHealthService      = bg.Error("unregistered health service")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthService

type HealthService struct {
	lanirpc.UnimplementedHealthServer
	// contains filtered or unexported fields
}

func NewHealthService

func NewHealthService() *HealthService

NewHealthService instantiates a new HealthService

func (*HealthService) Check

Check is the gRPC command to perform the health check on given API and plugin services

func (*HealthService) RegisterHealthService

func (h *HealthService) RegisterHealthService(name string, s RegisteredHealthService) error

RegisterHealthService registers a given service that we want to perform health checks on

func (*HealthService) RegisterWithGrpcServer

func (h *HealthService) RegisterWithGrpcServer(grpcServer *grpc.Server) error

RegisterWithGrpcServer registers the health service with the gRPC server

func (*HealthService) RegisterWithRestProxy

func (h *HealthService) RegisterWithRestProxy(ctx context.Context, mux *proxy.ServeMux, restDialOpts []grpc.DialOption, restProxyDest string) error

RegisterWithRestProxy registers the health service with the REST proxy server

type RegisteredHealthService

type RegisteredHealthService interface {
	Ping(context.Context) error
}

The RegisteredHealthService interface is used by the HealthService to ping any registered services

Jump to

Keyboard shortcuts

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