health

package
v5.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HealthService_GetHealthStatus_FullMethodName = "/health.HealthService/GetHealthStatus"
)

Variables

View Source
var (
	HealthStatus_HealthState_name = map[int32]string{
		0: "HEALTHY",
		1: "OVERLOADED",
		2: "DYING",
	}
	HealthStatus_HealthState_value = map[string]int32{
		"HEALTHY":    0,
		"OVERLOADED": 1,
		"DYING":      2,
	}
)

Enum value maps for HealthStatus_HealthState.

View Source
var File_voltha_protos_health_proto protoreflect.FileDescriptor
View Source
var HealthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "health.HealthService",
	HandlerType: (*HealthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHealthStatus",
			Handler:    _HealthService_GetHealthStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "voltha_protos/health.proto",
}

HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHealthServiceServer

func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)

Types

type HealthServiceClient

type HealthServiceClient interface {
	// Return current health status of a Voltha instance
	GetHealthStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthStatus, error)
}

HealthServiceClient is the client API for HealthService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Health related services

type HealthServiceServer

type HealthServiceServer interface {
	// Return current health status of a Voltha instance
	GetHealthStatus(context.Context, *emptypb.Empty) (*HealthStatus, error)
	// contains filtered or unexported methods
}

HealthServiceServer is the server API for HealthService service. All implementations must embed UnimplementedHealthServiceServer for forward compatibility.

Health related services

type HealthStatus

type HealthStatus struct {

	// Current state of health of this Voltha instance
	State HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=health.HealthStatus_HealthState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

Encode health status of a Voltha instance

func (*HealthStatus) Descriptor deprecated

func (*HealthStatus) Descriptor() ([]byte, []int)

Deprecated: Use HealthStatus.ProtoReflect.Descriptor instead.

func (*HealthStatus) GetState

func (x *HealthStatus) GetState() HealthStatus_HealthState

func (*HealthStatus) ProtoMessage

func (*HealthStatus) ProtoMessage()

func (*HealthStatus) ProtoReflect added in v5.7.1

func (x *HealthStatus) ProtoReflect() protoreflect.Message

func (*HealthStatus) Reset

func (x *HealthStatus) Reset()

func (*HealthStatus) String

func (x *HealthStatus) String() string

type HealthStatus_HealthState

type HealthStatus_HealthState int32

Health states

const (
	HealthStatus_HEALTHY    HealthStatus_HealthState = 0 // The instance is healthy
	HealthStatus_OVERLOADED HealthStatus_HealthState = 1 // The instance is overloaded, decrease query rate
	HealthStatus_DYING      HealthStatus_HealthState = 2 // The instance is in a critical condition, do not use it
)

func (HealthStatus_HealthState) Descriptor added in v5.7.1

func (HealthStatus_HealthState) Enum added in v5.7.1

func (HealthStatus_HealthState) EnumDescriptor deprecated

func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int)

Deprecated: Use HealthStatus_HealthState.Descriptor instead.

func (HealthStatus_HealthState) Number added in v5.7.1

func (HealthStatus_HealthState) String

func (x HealthStatus_HealthState) String() string

func (HealthStatus_HealthState) Type added in v5.7.1

type UnimplementedHealthServiceServer

type UnimplementedHealthServiceServer struct{}

UnimplementedHealthServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedHealthServiceServer) GetHealthStatus

type UnsafeHealthServiceServer added in v5.7.1

type UnsafeHealthServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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