Documentation ¶
Overview ¶
Package health is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterHealthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHealthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthClient) error
- func RegisterHealthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServer) error
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterInternalGRPCGatewayHandler(mux *runtime.ServeMux, endpoint string) error
- func RegisterInternalHealthService(srv *grpc.Server)
- type HealthCheckRequest
- type HealthCheckResponse
- type HealthClient
- type HealthServer
- type UnimplementedHealthServer
- type UnsafeHealthServer
Constants ¶
This section is empty.
Variables ¶
var File_http_server_health_health_proto protoreflect.FileDescriptor
Functions ¶
func RegisterHealthHandler ¶
RegisterHealthHandler registers the http handlers for service Health to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHealthHandlerClient ¶
func RegisterHealthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthClient) error
RegisterHealthHandlerClient registers the http handlers for service Health to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthClient" to call the correct interceptors.
func RegisterHealthHandlerFromEndpoint ¶
func RegisterHealthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHealthHandlerFromEndpoint is same as RegisterHealthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHealthHandlerServer ¶
func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServer) error
RegisterHealthHandlerServer registers the http handlers for service Health to "mux". UnaryRPC :call HealthServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthHandlerFromEndpoint instead.
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterInternalGRPCGatewayHandler ¶
RegisterInternalGRPCGatewayHandler grpc-gateway health handler
func RegisterInternalHealthService ¶
RegisterInternalHealthService grpc server health api registration
Types ¶
type HealthCheckRequest ¶
type HealthCheckRequest struct {
// contains filtered or unexported fields
}
func (*HealthCheckRequest) Descriptor
deprecated
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckResponse ¶
type HealthCheckResponse struct {
// contains filtered or unexported fields
}
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HealthClient ¶
type HealthClient interface {
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, 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 ¶
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) // contains filtered or unexported methods }
HealthServer is the server API for Health service. All implementations must embed UnimplementedHealthServer for forward compatibility
func ImplementedHealthService ¶
func ImplementedHealthService() HealthServer
ImplementedHealthService internal health service
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct { }
UnimplementedHealthServer must be embedded to have forward compatible implementations.
func (UnimplementedHealthServer) Check ¶
func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
type UnsafeHealthServer ¶ added in v1.0.9
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.