Documentation ¶
Index ¶
- Variables
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterHealthService(s grpc.ServiceRegistrar, srv *HealthService)
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)
- func (m *HealthCheckRequest) GetService() string
- func (*HealthCheckRequest) ProtoMessage()
- func (m *HealthCheckRequest) Reset()
- func (m *HealthCheckRequest) String() string
- func (m *HealthCheckRequest) XXX_DiscardUnknown()
- func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
- func (m *HealthCheckRequest) XXX_Size() int
- func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)
- func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (*HealthCheckResponse) ProtoMessage()
- func (m *HealthCheckResponse) Reset()
- func (m *HealthCheckResponse) String() string
- func (m *HealthCheckResponse) XXX_DiscardUnknown()
- func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
- func (m *HealthCheckResponse) XXX_Size() int
- func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
- type HealthCheckResponse_ServingStatus
- type HealthClient
- type HealthServer
- type HealthService
- type Health_WatchClient
- type Health_WatchServer
- type UnimplementedHealthServer
- type UnstableHealthService
Constants ¶
This section is empty.
Variables ¶
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
3: "SERVICE_UNKNOWN",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
"UNKNOWN": 0,
"SERVING": 1,
"NOT_SERVING": 2,
"SERVICE_UNKNOWN": 3,
}
Functions ¶
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterHealthService ¶ added in v1.33.1
func RegisterHealthService(s grpc.ServiceRegistrar, srv *HealthService)
RegisterHealthService registers a service implementation with a gRPC server.
Types ¶
type HealthCheckRequest ¶
type HealthCheckRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckRequest) Descriptor ¶
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
func (*HealthCheckRequest) GetService ¶ added in v1.6.0
func (m *HealthCheckRequest) GetService() string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) Reset ¶
func (m *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (m *HealthCheckRequest) String() string
func (*HealthCheckRequest) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶ added in v1.12.0
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶ added in v1.12.0
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶ added in v1.12.0
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶ added in v1.12.0
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckResponse ¶
type HealthCheckResponse struct { Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶ added in v1.6.0
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) Reset ¶
func (m *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (m *HealthCheckResponse) String() string
func (*HealthCheckResponse) XXX_DiscardUnknown ¶ added in v1.12.0
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶ added in v1.12.0
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶ added in v1.12.0
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶ added in v1.12.0
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶ added in v1.12.0
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponse_ServingStatus ¶
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 )
func (HealthCheckResponse_ServingStatus) EnumDescriptor ¶
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
type HealthClient ¶
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://godoc.org/github.com/fgiudici/grpc-go#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient
type HealthServer ¶
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.
type HealthService ¶ added in v1.33.1
type HealthService struct { // If the requested service is unknown, the call will fail with status // NOT_FOUND. Check func(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 func(*HealthCheckRequest, Health_WatchServer) error }
HealthService is the service API for Health service. Fields should be assigned to their respective handler implementations only before RegisterHealthService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.
func NewHealthService ¶ added in v1.33.1
func NewHealthService(s interface{}) *HealthService
NewHealthService creates a new HealthService containing the implemented methods of the Health service in s. Any unimplemented methods will result in the gRPC server returning an UNIMPLEMENTED status to the client. This includes situations where the method handler is misspelled or has the wrong signature. For this reason, this function should be used with great care and is not recommended to be used by most users.
type Health_WatchClient ¶ added in v1.33.1
type Health_WatchClient interface { Recv() (*HealthCheckResponse, error) grpc.ClientStream }
type Health_WatchServer ¶ added in v1.33.1
type Health_WatchServer interface { Send(*HealthCheckResponse) error grpc.ServerStream }
type UnimplementedHealthServer ¶ added in v1.33.1
type UnimplementedHealthServer struct { }
UnimplementedHealthServer can be embedded to have forward compatible implementations.
func (*UnimplementedHealthServer) Check ¶ added in v1.33.1
func (*UnimplementedHealthServer) Check(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error)
func (*UnimplementedHealthServer) Watch ¶ added in v1.33.1
func (*UnimplementedHealthServer) Watch(req *HealthCheckRequest, srv Health_WatchServer) error
type UnstableHealthService ¶ added in v1.33.1
type UnstableHealthService 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 }
UnstableHealthService is the service API for Health service. New methods may be added to this interface if they are added to the service definition, which is not a backward-compatible change. For this reason, use of this type is not recommended.