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