Documentation ¶
Overview ¶
Package greet is a generated protocol buffer package.
It is generated from these files:
greet.proto
It has these top-level messages:
GreetRequest GreetResponse
Package greet is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterGreetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGreetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreetServiceClient) error
- func RegisterGreetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGreetServiceServer(s *grpc.Server, srv GreetServiceServer)
- type GreetRequest
- type GreetResponse
- type GreetServiceClient
- type GreetServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGreetServiceHandler ¶
func RegisterGreetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGreetServiceHandler registers the http handlers for service GreetService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGreetServiceHandlerClient ¶
func RegisterGreetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreetServiceClient) error
RegisterGreetServiceHandler registers the http handlers for service GreetService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GreetServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GreetServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GreetServiceClient" to call the correct interceptors.
func RegisterGreetServiceHandlerFromEndpoint ¶
func RegisterGreetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGreetServiceHandlerFromEndpoint is same as RegisterGreetServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGreetServiceServer ¶
func RegisterGreetServiceServer(s *grpc.Server, srv GreetServiceServer)
Types ¶
type GreetRequest ¶
type GreetRequest struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (*GreetRequest) Descriptor ¶
func (*GreetRequest) Descriptor() ([]byte, []int)
func (*GreetRequest) GetValue ¶
func (m *GreetRequest) GetValue() string
func (*GreetRequest) ProtoMessage ¶
func (*GreetRequest) ProtoMessage()
func (*GreetRequest) Reset ¶
func (m *GreetRequest) Reset()
func (*GreetRequest) String ¶
func (m *GreetRequest) String() string
type GreetResponse ¶
type GreetResponse struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (*GreetResponse) Descriptor ¶
func (*GreetResponse) Descriptor() ([]byte, []int)
func (*GreetResponse) GetValue ¶
func (m *GreetResponse) GetValue() string
func (*GreetResponse) ProtoMessage ¶
func (*GreetResponse) ProtoMessage()
func (*GreetResponse) Reset ¶
func (m *GreetResponse) Reset()
func (*GreetResponse) String ¶
func (m *GreetResponse) String() string
type GreetServiceClient ¶
type GreetServiceClient interface {
Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error)
}
func NewGreetServiceClient ¶
func NewGreetServiceClient(cc *grpc.ClientConn) GreetServiceClient
type GreetServiceServer ¶
type GreetServiceServer interface {
Greet(context.Context, *GreetRequest) (*GreetResponse, error)
}