Documentation ¶
Overview ¶
Package greeter is a generated protocol buffer package.
It is generated from these files:
hello.proto
It has these top-level messages:
Request Response
Package greeter is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterSayHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSayHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSayServer(s *grpc.Server, srv SayServer)
- type Request
- type Response
- type SayClient
- type SayServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSayHandler ¶
RegisterSayHandler registers the http handlers for service Say to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSayHandlerFromEndpoint ¶
func RegisterSayHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSayHandlerFromEndpoint is same as RegisterSayHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSayServer ¶
Types ¶
type Request ¶
type Request struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct {
Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type SayClient ¶
type SayClient interface {
Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
func NewSayClient ¶
func NewSayClient(cc *grpc.ClientConn) SayClient
Click to show internal directories.
Click to hide internal directories.