health

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetServingStatusNotServing

func SetServingStatusNotServing(service string)

func SetServingStatusServing

func SetServingStatusServing(service string)

Types

type DubbogoHealthServer

type DubbogoHealthServer struct {
	healthpb.UnimplementedHealthServer
	// contains filtered or unexported fields
}

Server implements `service Health`.

func NewServer

func NewServer() *DubbogoHealthServer

NewServer returns a new Server.

func (*DubbogoHealthServer) Check

Check implements `service Health`.

func (*DubbogoHealthServer) Resume

func (s *DubbogoHealthServer) Resume()

Resume sets all serving status to SERVING, and configures the server to accept all future status changes.

This changes serving status for all services. To set status for a particular services, call SetServingStatus().

func (*DubbogoHealthServer) SetServingStatus

func (s *DubbogoHealthServer) 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 (*DubbogoHealthServer) Shutdown

func (s *DubbogoHealthServer) Shutdown()

Shutdown sets all serving status to NOT_SERVING, and configures the server to ignore all future status changes.

This changes serving status for all services. To set status for a particular services, call SetServingStatus().

func (*DubbogoHealthServer) Watch

Watch implements `service Health`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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