Documentation ¶
Overview ¶
Package healthcheck is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterHealthcheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHealthcheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthcheckServiceClient) error
- func RegisterHealthcheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHealthcheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthcheckServiceServer) error
- func RegisterHealthcheckServiceServer(s *grpc.Server, srv HealthcheckServiceServer)
- type Empty
- type HealthcheckServiceClient
- type HealthcheckServiceServer
- type MessageOutput
- type UnimplementedHealthcheckServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_healthcheck_proto protoreflect.FileDescriptor
Functions ¶
func RegisterHealthcheckServiceHandler ¶
func RegisterHealthcheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHealthcheckServiceHandler registers the http handlers for service HealthcheckService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHealthcheckServiceHandlerClient ¶
func RegisterHealthcheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthcheckServiceClient) error
RegisterHealthcheckServiceHandlerClient registers the http handlers for service HealthcheckService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthcheckServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthcheckServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthcheckServiceClient" to call the correct interceptors.
func RegisterHealthcheckServiceHandlerFromEndpoint ¶
func RegisterHealthcheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHealthcheckServiceHandlerFromEndpoint is same as RegisterHealthcheckServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHealthcheckServiceHandlerServer ¶
func RegisterHealthcheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthcheckServiceServer) error
RegisterHealthcheckServiceHandlerServer registers the http handlers for service HealthcheckService to "mux". UnaryRPC :call HealthcheckServiceServer 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 RegisterHealthcheckServiceHandlerFromEndpoint instead.
func RegisterHealthcheckServiceServer ¶
func RegisterHealthcheckServiceServer(s *grpc.Server, srv HealthcheckServiceServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type HealthcheckServiceClient ¶
type HealthcheckServiceClient interface {
Healthcheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*MessageOutput, error)
}
HealthcheckServiceClient is the client API for HealthcheckService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHealthcheckServiceClient ¶
func NewHealthcheckServiceClient(cc grpc.ClientConnInterface) HealthcheckServiceClient
type HealthcheckServiceServer ¶
type HealthcheckServiceServer interface {
Healthcheck(context.Context, *Empty) (*MessageOutput, error)
}
HealthcheckServiceServer is the server API for HealthcheckService service.
type MessageOutput ¶
type MessageOutput struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*MessageOutput) Descriptor
deprecated
func (*MessageOutput) Descriptor() ([]byte, []int)
Deprecated: Use MessageOutput.ProtoReflect.Descriptor instead.
func (*MessageOutput) GetMsg ¶
func (x *MessageOutput) GetMsg() string
func (*MessageOutput) ProtoMessage ¶
func (*MessageOutput) ProtoMessage()
func (*MessageOutput) ProtoReflect ¶
func (x *MessageOutput) ProtoReflect() protoreflect.Message
func (*MessageOutput) Reset ¶
func (x *MessageOutput) Reset()
func (*MessageOutput) String ¶
func (x *MessageOutput) String() string
type UnimplementedHealthcheckServiceServer ¶
type UnimplementedHealthcheckServiceServer struct { }
UnimplementedHealthcheckServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedHealthcheckServiceServer) Healthcheck ¶
func (*UnimplementedHealthcheckServiceServer) Healthcheck(context.Context, *Empty) (*MessageOutput, error)