Documentation ¶
Overview ¶
Package v1alpha1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package v1alpha1 is a generated protocol buffer package.
It is generated from these files:
hello.proto
It has these top-level messages:
IntroRequest IntroResponse
Package v1alpha1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func ExportHelloServiceCorsPatterns() []runtime.Pattern
- 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 RegisterHelloServiceServer(s *grpc.Server, srv HelloServiceServer)
- type HelloServiceClient
- type HelloServiceServer
- type HelloService_StreamClient
- type HelloService_StreamServer
- type IntroRequest
- type IntroResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportHelloServiceCorsPatterns ¶
ExportHelloServiceCorsPatterns returns an array of grpc gatway mux patterns for HelloService service to enable CORS.
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
RegisterHelloServiceHandler 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 RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s *grpc.Server, 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) }
func NewHelloServiceClient ¶
func NewHelloServiceClient(cc *grpc.ClientConn) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { Intro(context.Context, *IntroRequest) (*IntroResponse, error) Stream(*IntroRequest, HelloService_StreamServer) error }
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" json:"name,omitempty"`
}
func (*IntroRequest) Descriptor ¶
func (*IntroRequest) Descriptor() ([]byte, []int)
func (*IntroRequest) GetName ¶
func (m *IntroRequest) GetName() string
func (*IntroRequest) IsRequest ¶
func (m *IntroRequest) IsRequest()
func (*IntroRequest) ProtoMessage ¶
func (*IntroRequest) ProtoMessage()
func (*IntroRequest) Reset ¶
func (m *IntroRequest) Reset()
func (*IntroRequest) String ¶
func (m *IntroRequest) String() string
func (*IntroRequest) Valid ¶
func (m *IntroRequest) Valid() (*gojsonschema.Result, error)
type IntroResponse ¶
type IntroResponse struct {
Intro string `protobuf:"bytes,1,opt,name=intro" json:"intro,omitempty"`
}
func (*IntroResponse) Descriptor ¶
func (*IntroResponse) Descriptor() ([]byte, []int)
func (*IntroResponse) GetIntro ¶
func (m *IntroResponse) GetIntro() string
func (*IntroResponse) ProtoMessage ¶
func (*IntroResponse) ProtoMessage()
func (*IntroResponse) Reset ¶
func (m *IntroResponse) Reset()
func (*IntroResponse) String ¶
func (m *IntroResponse) String() string