services

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2022 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package services is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_controller_ops_services_v1_health_service_proto protoreflect.FileDescriptor
View Source
var HealthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.ops.services.v1.HealthService",
	HandlerType: (*HealthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHealth",
			Handler:    _HealthService_GetHealth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller/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 {
	// contains filtered or unexported fields
}

func (*GetHealthRequest) Descriptor deprecated

func (*GetHealthRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetHealthRequest.ProtoReflect.Descriptor instead.

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 {
	// contains filtered or unexported fields
}

func (*GetHealthResponse) Descriptor deprecated

func (*GetHealthResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetHealthResponse.ProtoReflect.Descriptor instead.

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.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL