Documentation ¶
Overview ¶
Package hello is a generated protocol buffer package.
It is generated from these files:
proto/hello.proto
It has these top-level messages:
HelloRequest HelloResponse
Package hello is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- 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 HelloRequest
- type HelloResponse
- type HelloServiceClient
- type HelloServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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
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 HelloRequest ¶
type HelloRequest struct { // Name of caller. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` }
Request for service to say hello.
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) GetName ¶
func (m *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (m *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { // Greeting from service. Greeting string `protobuf:"bytes,1,opt,name=greeting" json:"greeting,omitempty"` }
Response with greeting from service.
func (*HelloResponse) Descriptor ¶
func (*HelloResponse) Descriptor() ([]byte, []int)
func (*HelloResponse) GetGreeting ¶
func (m *HelloResponse) GetGreeting() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) Reset ¶
func (m *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (m *HelloResponse) String() string
type HelloServiceClient ¶
type HelloServiceClient interface { // Request a personalized greeting. Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) }
func NewHelloServiceClient ¶
func NewHelloServiceClient(cc *grpc.ClientConn) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { // Request a personalized greeting. Hello(context.Context, *HelloRequest) (*HelloResponse, error) }