Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterPingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingClient) error
- func RegisterPingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPingServer(s *grpc.Server, srv PingServer)
- type PingClient
- type PingMessage
- func (*PingMessage) Descriptor() ([]byte, []int)
- func (m *PingMessage) GetGreeting() string
- func (*PingMessage) ProtoMessage()
- func (m *PingMessage) Reset()
- func (m *PingMessage) String() string
- func (m *PingMessage) XXX_DiscardUnknown()
- func (m *PingMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingMessage) XXX_Merge(src proto.Message)
- func (m *PingMessage) XXX_Size() int
- func (m *PingMessage) XXX_Unmarshal(b []byte) error
- type PingServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPingHandler ¶
RegisterPingHandler registers the http handlers for service Ping to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPingHandlerClient ¶
RegisterPingHandlerClient registers the http handlers for service Ping to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PingClient" to call the correct interceptors.
func RegisterPingHandlerFromEndpoint ¶
func RegisterPingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPingHandlerFromEndpoint is same as RegisterPingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPingServer ¶
func RegisterPingServer(s *grpc.Server, srv PingServer)
Types ¶
type PingClient ¶
type PingClient interface {
Say(ctx context.Context, in *PingMessage, opts ...grpc.CallOption) (*PingMessage, error)
}
PingClient is the client API for Ping service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPingClient ¶
func NewPingClient(cc *grpc.ClientConn) PingClient
type PingMessage ¶
type PingMessage struct { Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PingMessage) Descriptor ¶
func (*PingMessage) Descriptor() ([]byte, []int)
func (*PingMessage) GetGreeting ¶
func (m *PingMessage) GetGreeting() string
func (*PingMessage) ProtoMessage ¶
func (*PingMessage) ProtoMessage()
func (*PingMessage) Reset ¶
func (m *PingMessage) Reset()
func (*PingMessage) String ¶
func (m *PingMessage) String() string
func (*PingMessage) XXX_DiscardUnknown ¶
func (m *PingMessage) XXX_DiscardUnknown()
func (*PingMessage) XXX_Marshal ¶
func (m *PingMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingMessage) XXX_Merge ¶
func (m *PingMessage) XXX_Merge(src proto.Message)
func (*PingMessage) XXX_Size ¶
func (m *PingMessage) XXX_Size() int
func (*PingMessage) XXX_Unmarshal ¶
func (m *PingMessage) XXX_Unmarshal(b []byte) error
type PingServer ¶
type PingServer interface {
Say(context.Context, *PingMessage) (*PingMessage, error)
}
PingServer is the server API for Ping service.