Documentation ¶
Overview ¶
Package v1alpha1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterHelloServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHelloServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloServiceClient) error
- func RegisterHelloServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHelloServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HelloServiceServer) error
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type HelloServiceClient
- type HelloServiceServer
- type HelloService_StreamClient
- type HelloService_StreamServer
- type IntroRequest
- type IntroResponse
- type UnimplementedHelloServiceServer
- type UnsafeHelloServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_apis_hello_v1alpha1_hello_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "voyagermesh.dev.hellogrpc.apis.hello.v1alpha1.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Intro", Handler: _HelloService_Intro_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _HelloService_Stream_Handler, ServerStreams: true, }, }, Metadata: "apis/hello/v1alpha1/hello.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServiceHandler ¶
func RegisterHelloServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHelloServiceHandler registers the http handlers for service HelloService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHelloServiceHandlerClient ¶
func RegisterHelloServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloServiceClient) error
RegisterHelloServiceHandlerClient registers the http handlers for service HelloService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HelloServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HelloServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HelloServiceClient" to call the correct interceptors.
func RegisterHelloServiceHandlerFromEndpoint ¶
func RegisterHelloServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHelloServiceHandlerFromEndpoint is same as RegisterHelloServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHelloServiceHandlerServer ¶
func RegisterHelloServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HelloServiceServer) error
RegisterHelloServiceHandlerServer registers the http handlers for service HelloService to "mux". UnaryRPC :call HelloServiceServer 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 RegisterHelloServiceHandlerFromEndpoint instead.
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
Types ¶
type HelloServiceClient ¶
type HelloServiceClient interface { Intro(ctx context.Context, in *IntroRequest, opts ...grpc.CallOption) (*IntroResponse, error) Stream(ctx context.Context, in *IntroRequest, opts ...grpc.CallOption) (HelloService_StreamClient, error) }
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { Intro(context.Context, *IntroRequest) (*IntroResponse, error) Stream(*IntroRequest, HelloService_StreamServer) error // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type HelloService_StreamClient ¶
type HelloService_StreamClient interface { Recv() (*IntroResponse, error) grpc.ClientStream }
type HelloService_StreamServer ¶
type HelloService_StreamServer interface { Send(*IntroResponse) error grpc.ServerStream }
type IntroRequest ¶
type IntroRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*IntroRequest) Descriptor
deprecated
func (*IntroRequest) Descriptor() ([]byte, []int)
Deprecated: Use IntroRequest.ProtoReflect.Descriptor instead.
func (*IntroRequest) GetName ¶
func (x *IntroRequest) GetName() string
func (*IntroRequest) ProtoMessage ¶
func (*IntroRequest) ProtoMessage()
func (*IntroRequest) ProtoReflect ¶
func (x *IntroRequest) ProtoReflect() protoreflect.Message
func (*IntroRequest) Reset ¶
func (x *IntroRequest) Reset()
func (*IntroRequest) String ¶
func (x *IntroRequest) String() string
type IntroResponse ¶
type IntroResponse struct { Intro string `protobuf:"bytes,1,opt,name=intro,proto3" json:"intro,omitempty"` // contains filtered or unexported fields }
func (*IntroResponse) Descriptor
deprecated
func (*IntroResponse) Descriptor() ([]byte, []int)
Deprecated: Use IntroResponse.ProtoReflect.Descriptor instead.
func (*IntroResponse) GetIntro ¶
func (x *IntroResponse) GetIntro() string
func (*IntroResponse) ProtoMessage ¶
func (*IntroResponse) ProtoMessage()
func (*IntroResponse) ProtoReflect ¶
func (x *IntroResponse) ProtoReflect() protoreflect.Message
func (*IntroResponse) Reset ¶
func (x *IntroResponse) Reset()
func (*IntroResponse) String ¶
func (x *IntroResponse) String() string
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServiceServer) Intro ¶
func (UnimplementedHelloServiceServer) Intro(context.Context, *IntroRequest) (*IntroResponse, error)
func (UnimplementedHelloServiceServer) Stream ¶
func (UnimplementedHelloServiceServer) Stream(*IntroRequest, HelloService_StreamServer) error
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.