Documentation ¶
Index ¶
- Variables
- func NewHealthEndpoints() []*api.Endpoint
- func RegisterHealthHandler(s server.Server, hdlr HealthHandler, opts ...server.HandlerOption) error
- 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) Validate() error
- 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 HealthCheckRequestValidationError
- func (e HealthCheckRequestValidationError) Cause() error
- func (e HealthCheckRequestValidationError) Error() string
- func (e HealthCheckRequestValidationError) ErrorName() string
- func (e HealthCheckRequestValidationError) Field() string
- func (e HealthCheckRequestValidationError) Key() bool
- func (e HealthCheckRequestValidationError) Reason() string
- 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) Validate() error
- 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 HealthCheckResponseValidationError
- func (e HealthCheckResponseValidationError) Cause() error
- func (e HealthCheckResponseValidationError) Error() string
- func (e HealthCheckResponseValidationError) ErrorName() string
- func (e HealthCheckResponseValidationError) Field() string
- func (e HealthCheckResponseValidationError) Key() bool
- func (e HealthCheckResponseValidationError) Reason() string
- type HealthCheckResponse_ServingStatus
- type HealthHandler
- type HealthService
- type Health_WatchService
- type Health_WatchStream
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 NewHealthEndpoints ¶
func RegisterHealthHandler ¶
func RegisterHealthHandler(s server.Server, hdlr HealthHandler, opts ...server.HandlerOption) error
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 ¶
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) Validate ¶
func (m *HealthCheckRequest) Validate() error
Validate checks the field values on HealthCheckRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*HealthCheckRequest) XXX_DiscardUnknown ¶
func (m *HealthCheckRequest) XXX_DiscardUnknown()
func (*HealthCheckRequest) XXX_Marshal ¶
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckRequest) XXX_Merge ¶
func (m *HealthCheckRequest) XXX_Merge(src proto.Message)
func (*HealthCheckRequest) XXX_Size ¶
func (m *HealthCheckRequest) XXX_Size() int
func (*HealthCheckRequest) XXX_Unmarshal ¶
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error
type HealthCheckRequestValidationError ¶
type HealthCheckRequestValidationError struct {
// contains filtered or unexported fields
}
HealthCheckRequestValidationError is the validation error returned by HealthCheckRequest.Validate if the designated constraints aren't met.
func (HealthCheckRequestValidationError) Cause ¶
func (e HealthCheckRequestValidationError) Cause() error
Cause function returns cause value.
func (HealthCheckRequestValidationError) Error ¶
func (e HealthCheckRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HealthCheckRequestValidationError) ErrorName ¶
func (e HealthCheckRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HealthCheckRequestValidationError) Field ¶
func (e HealthCheckRequestValidationError) Field() string
Field function returns field value.
func (HealthCheckRequestValidationError) Key ¶
func (e HealthCheckRequestValidationError) Key() bool
Key function returns key value.
func (HealthCheckRequestValidationError) Reason ¶
func (e HealthCheckRequestValidationError) Reason() string
Reason function returns reason value.
type HealthCheckResponse ¶
type HealthCheckResponse struct { Status HealthCheckResponse_ServingStatus `` /* 128-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HealthCheckResponse) Descriptor ¶
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
func (*HealthCheckResponse) GetStatus ¶
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) Validate ¶
func (m *HealthCheckResponse) Validate() error
Validate checks the field values on HealthCheckResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*HealthCheckResponse) XXX_DiscardUnknown ¶
func (m *HealthCheckResponse) XXX_DiscardUnknown()
func (*HealthCheckResponse) XXX_Marshal ¶
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthCheckResponse) XXX_Merge ¶
func (m *HealthCheckResponse) XXX_Merge(src proto.Message)
func (*HealthCheckResponse) XXX_Size ¶
func (m *HealthCheckResponse) XXX_Size() int
func (*HealthCheckResponse) XXX_Unmarshal ¶
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error
type HealthCheckResponseValidationError ¶
type HealthCheckResponseValidationError struct {
// contains filtered or unexported fields
}
HealthCheckResponseValidationError is the validation error returned by HealthCheckResponse.Validate if the designated constraints aren't met.
func (HealthCheckResponseValidationError) Cause ¶
func (e HealthCheckResponseValidationError) Cause() error
Cause function returns cause value.
func (HealthCheckResponseValidationError) Error ¶
func (e HealthCheckResponseValidationError) Error() string
Error satisfies the builtin error interface
func (HealthCheckResponseValidationError) ErrorName ¶
func (e HealthCheckResponseValidationError) ErrorName() string
ErrorName returns error name.
func (HealthCheckResponseValidationError) Field ¶
func (e HealthCheckResponseValidationError) Field() string
Field function returns field value.
func (HealthCheckResponseValidationError) Key ¶
func (e HealthCheckResponseValidationError) Key() bool
Key function returns key value.
func (HealthCheckResponseValidationError) Reason ¶
func (e HealthCheckResponseValidationError) Reason() string
Reason function returns reason value.
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 HealthHandler ¶
type HealthHandler 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(context.Context, *HealthCheckRequest, Health_WatchStream) error }
type HealthService ¶
type HealthService interface { // If the requested service is unknown, the call will fail with status // NOT_FOUND. Check(ctx context.Context, in *HealthCheckRequest, opts ...client.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 ...client.CallOption) (Health_WatchService, error) }
func NewHealthService ¶
func NewHealthService(name string, c client.Client) HealthService