Documentation ¶
Overview ¶
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 RegisterSayHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SayClient) error
- func RegisterSayHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSayServer(s *grpc.Server, srv SayServer)
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetName() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetMsg() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- 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 RegisterSayHandlerClient ¶
RegisterSayHandlerClient registers the http handlers for service Say to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SayClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SayClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SayClient" to call the correct interceptors.
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,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type SayClient ¶
type SayClient interface {
Hello(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
SayClient is the client API for Say service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSayClient ¶
func NewSayClient(cc *grpc.ClientConn) SayClient