Documentation ¶
Overview ¶
Package echopb is a generated protocol buffer package.
It is generated from these files:
service.proto
It has these top-level messages:
EchoMessage
Package echopb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- func RegisterEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) 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 ¶
View Source
const (
Swagger = swagger
)
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 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 {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (*EchoMessage) Descriptor ¶
func (*EchoMessage) Descriptor() ([]byte, []int)
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 {
Echo(ctx context.Context, in *EchoMessage, opts ...grpc.CallOption) (*EchoMessage, error)
}
func NewEchoServiceClient ¶
func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface {
Echo(context.Context, *EchoMessage) (*EchoMessage, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.