Documentation ¶
Overview ¶
Package services is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterHealthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHealthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthServiceClient) error
- func RegisterHealthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHealthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServiceServer) error
- func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
- type GetHealthRequest
- type GetHealthResponse
- func (*GetHealthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetHealthResponse) GetWorkerProcessInfo() *health.HealthInfo
- func (*GetHealthResponse) ProtoMessage()
- func (x *GetHealthResponse) ProtoReflect() protoreflect.Message
- func (x *GetHealthResponse) Reset()
- func (x *GetHealthResponse) String() string
- type HealthServiceClient
- type HealthServiceServer
- type UnimplementedHealthServiceServer
- type UnsafeHealthServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_ops_services_v1_health_service_proto protoreflect.FileDescriptor
var HealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ops.services.v1.HealthService", HandlerType: (*HealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetHealth", Handler: _HealthService_GetHealth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ops/services/v1/health_service.proto", }
HealthService_ServiceDesc is the grpc.ServiceDesc for HealthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHealthServiceHandler ¶
func RegisterHealthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHealthServiceHandler registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHealthServiceHandlerClient ¶
func RegisterHealthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthServiceClient) error
RegisterHealthServiceHandlerClient registers the http handlers for service HealthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HealthServiceClient" to call the correct interceptors.
func RegisterHealthServiceHandlerFromEndpoint ¶
func RegisterHealthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHealthServiceHandlerFromEndpoint is same as RegisterHealthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHealthServiceHandlerServer ¶
func RegisterHealthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServiceServer) error
RegisterHealthServiceHandlerServer registers the http handlers for service HealthService to "mux". UnaryRPC :call HealthServiceServer 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 RegisterHealthServiceHandlerFromEndpoint instead.
func RegisterHealthServiceServer ¶
func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)
Types ¶
type GetHealthRequest ¶
type GetHealthRequest struct { // Experimental: This field may change or be removed without notice. WorkerInfo bool `protobuf:"varint,1,opt,name=worker_info,proto3" json:"worker_info,omitempty"` // contains filtered or unexported fields }
func (*GetHealthRequest) Descriptor
deprecated
func (*GetHealthRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetHealthRequest.ProtoReflect.Descriptor instead.
func (*GetHealthRequest) GetWorkerInfo ¶
func (x *GetHealthRequest) GetWorkerInfo() bool
func (*GetHealthRequest) ProtoMessage ¶
func (*GetHealthRequest) ProtoMessage()
func (*GetHealthRequest) ProtoReflect ¶
func (x *GetHealthRequest) ProtoReflect() protoreflect.Message
func (*GetHealthRequest) Reset ¶
func (x *GetHealthRequest) Reset()
func (*GetHealthRequest) String ¶
func (x *GetHealthRequest) String() string
type GetHealthResponse ¶
type GetHealthResponse struct { // Experimental: This field may change or be removed without notice. WorkerProcessInfo *health.HealthInfo `protobuf:"bytes,1,opt,name=worker_process_info,proto3" json:"worker_process_info,omitempty"` // contains filtered or unexported fields }
func (*GetHealthResponse) Descriptor
deprecated
func (*GetHealthResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetHealthResponse.ProtoReflect.Descriptor instead.
func (*GetHealthResponse) GetWorkerProcessInfo ¶
func (x *GetHealthResponse) GetWorkerProcessInfo() *health.HealthInfo
func (*GetHealthResponse) ProtoMessage ¶
func (*GetHealthResponse) ProtoMessage()
func (*GetHealthResponse) ProtoReflect ¶
func (x *GetHealthResponse) ProtoReflect() protoreflect.Message
func (*GetHealthResponse) Reset ¶
func (x *GetHealthResponse) Reset()
func (*GetHealthResponse) String ¶
func (x *GetHealthResponse) String() string
type HealthServiceClient ¶
type HealthServiceClient interface {
GetHealth(ctx context.Context, in *GetHealthRequest, opts ...grpc.CallOption) (*GetHealthResponse, error)
}
HealthServiceClient is the client API for HealthService 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 NewHealthServiceClient ¶
func NewHealthServiceClient(cc grpc.ClientConnInterface) HealthServiceClient
type HealthServiceServer ¶
type HealthServiceServer interface { GetHealth(context.Context, *GetHealthRequest) (*GetHealthResponse, error) // contains filtered or unexported methods }
HealthServiceServer is the server API for HealthService service. All implementations must embed UnimplementedHealthServiceServer for forward compatibility
type UnimplementedHealthServiceServer ¶
type UnimplementedHealthServiceServer struct { }
UnimplementedHealthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHealthServiceServer) GetHealth ¶
func (UnimplementedHealthServiceServer) GetHealth(context.Context, *GetHealthRequest) (*GetHealthResponse, error)
type UnsafeHealthServiceServer ¶
type UnsafeHealthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServiceServer will result in compilation errors.