grpc: google.golang.org/grpc/health/grpc_health_v1 Index | Files

package grpc_health_v1

import "google.golang.org/grpc/health/grpc_health_v1"

Index

Package Files

health.pb.go health_grpc.pb.go

Variables

var (
    HealthCheckResponse_ServingStatus_name = map[int32]string{
        0:  "UNKNOWN",
        1:  "SERVING",
        2:  "NOT_SERVING",
        3:  "SERVICE_UNKNOWN",
    }
    HealthCheckResponse_ServingStatus_value = map[string]int32{
        "UNKNOWN":         0,
        "SERVING":         1,
        "NOT_SERVING":     2,
        "SERVICE_UNKNOWN": 3,
    }
)

Enum value maps for HealthCheckResponse_ServingStatus.

var File_grpc_health_v1_health_proto protoreflect.FileDescriptor
var Health_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "grpc.health.v1.Health",
    HandlerType: (*HealthServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "Check",
            Handler:    _Health_Check_Handler,
        },
    },
    Streams: []grpc.StreamDesc{
        {
            StreamName:    "Watch",
            Handler:       _Health_Watch_Handler,
            ServerStreams: true,
        },
    },
    Metadata: "grpc/health/v1/health.proto",
}

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

func RegisterHealthServer Uses

func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)

type HealthCheckRequest Uses

type HealthCheckRequest struct {
    Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    // contains filtered or unexported fields
}

func (*HealthCheckRequest) Descriptor Uses

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService Uses

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage Uses

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect Uses

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

func (*HealthCheckRequest) Reset Uses

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String Uses

func (x *HealthCheckRequest) String() string

type HealthCheckResponse Uses

type HealthCheckResponse struct {
    Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
    // contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor Uses

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus Uses

func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus

func (*HealthCheckResponse) ProtoMessage Uses

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect Uses

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

func (*HealthCheckResponse) Reset Uses

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String Uses

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_ServingStatus Uses

type HealthCheckResponse_ServingStatus int32
const (
    HealthCheckResponse_UNKNOWN         HealthCheckResponse_ServingStatus = 0
    HealthCheckResponse_SERVING         HealthCheckResponse_ServingStatus = 1
    HealthCheckResponse_NOT_SERVING     HealthCheckResponse_ServingStatus = 2
    HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method.
)

func (HealthCheckResponse_ServingStatus) Descriptor Uses

func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor

func (HealthCheckResponse_ServingStatus) Enum Uses

func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus

func (HealthCheckResponse_ServingStatus) EnumDescriptor Uses

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

Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.

func (HealthCheckResponse_ServingStatus) Number Uses

func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber

func (HealthCheckResponse_ServingStatus) String Uses

func (x HealthCheckResponse_ServingStatus) String() string

func (HealthCheckResponse_ServingStatus) Type Uses

func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType

type HealthClient Uses

type HealthClient interface {
    // If the requested service is unknown, the call will fail with status
    // NOT_FOUND.
    Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
    // Performs a watch for the serving status of the requested service.
    // The server will immediately send back a message indicating the current
    // serving status.  It will then subsequently send a new message whenever
    // the service's serving status changes.
    //
    // If the requested service is unknown when the call is received, the
    // server will send a message setting the serving status to
    // SERVICE_UNKNOWN but will *not* terminate the call.  If at some
    // future point, the serving status of the service becomes known, the
    // server will send a new message with the service's serving status.
    //
    // If the call terminates with status UNIMPLEMENTED, then clients
    // should assume this method is not supported and should not retry the
    // call.  If the call terminates with any other status (including OK),
    // clients should retry the call with appropriate exponential backoff.
    Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error)
}

HealthClient is the client API for Health 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.

func NewHealthClient Uses

func NewHealthClient(cc grpc.ClientConnInterface) HealthClient

type HealthServer Uses

type HealthServer interface {
    // If the requested service is unknown, the call will fail with status
    // NOT_FOUND.
    Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
    // Performs a watch for the serving status of the requested service.
    // The server will immediately send back a message indicating the current
    // serving status.  It will then subsequently send a new message whenever
    // the service's serving status changes.
    //
    // If the requested service is unknown when the call is received, the
    // server will send a message setting the serving status to
    // SERVICE_UNKNOWN but will *not* terminate the call.  If at some
    // future point, the serving status of the service becomes known, the
    // server will send a new message with the service's serving status.
    //
    // If the call terminates with status UNIMPLEMENTED, then clients
    // should assume this method is not supported and should not retry the
    // call.  If the call terminates with any other status (including OK),
    // clients should retry the call with appropriate exponential backoff.
    Watch(*HealthCheckRequest, Health_WatchServer) error
}

HealthServer is the server API for Health service. All implementations should embed UnimplementedHealthServer for forward compatibility

type Health_WatchClient Uses

type Health_WatchClient interface {
    Recv() (*HealthCheckResponse, error)
    grpc.ClientStream
}

type Health_WatchServer Uses

type Health_WatchServer interface {
    Send(*HealthCheckResponse) error
    grpc.ServerStream
}

type UnimplementedHealthServer Uses

type UnimplementedHealthServer struct {
}

UnimplementedHealthServer should be embedded to have forward compatible implementations.

func (UnimplementedHealthServer) Check Uses

func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)

func (UnimplementedHealthServer) Watch Uses

func (UnimplementedHealthServer) Watch(*HealthCheckRequest, Health_WatchServer) error

type UnsafeHealthServer Uses

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

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

Package grpc_health_v1 imports 9 packages (graph) and is imported by 782 packages. Updated 2021-01-15. Refresh now. Tools for package owners.