Documentation ¶
Index ¶
- Constants
- type HealthService
- func (h *HealthService) Check(ctx context.Context, req *lanirpc.HealthRequest) (*lanirpc.HealthResponse, error)
- func (h *HealthService) RegisterHealthService(name string, s RegisteredHealthService) error
- func (h *HealthService) RegisterWithGrpcServer(grpcServer *grpc.Server) error
- func (h *HealthService) RegisterWithRestProxy(ctx context.Context, mux *proxy.ServeMux, restDialOpts []grpc.DialOption, ...) error
- type RegisteredHealthService
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 ¶
func (h *HealthService) Check(ctx context.Context, req *lanirpc.HealthRequest) (*lanirpc.HealthResponse, error)
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 ¶
The RegisteredHealthService interface is used by the HealthService to ping any registered services
Click to show internal directories.
Click to hide internal directories.