Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package. It is generated from these files: helloworld.proto It has these top-level messages: HelloRequest HelloReply
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGreeterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error
- func RegisterGreeterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (this *HelloReply) Equal(that interface{}) bool
- func (m *HelloReply) GetMessage() string
- func (this *HelloReply) GoString() string
- func (m *HelloReply) Marshal() (dAtA []byte, err error)
- func (m *HelloReply) MarshalTo(dAtA []byte) (int, error)
- func (*HelloReply) ProtoMessage()
- func (m *HelloReply) Reset()
- func (m *HelloReply) Size() (n int)
- func (this *HelloReply) String() string
- func (m *HelloReply) Unmarshal(dAtA []byte) error
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)
- func (this *HelloRequest) Equal(that interface{}) bool
- func (m *HelloRequest) GetName() string
- func (this *HelloRequest) GoString() string
- func (m *HelloRequest) Marshal() (dAtA []byte, err error)
- func (m *HelloRequest) MarshalTo(dAtA []byte) (int, error)
- func (*HelloRequest) ProtoMessage()
- func (m *HelloRequest) Reset()
- func (m *HelloRequest) Size() (n int)
- func (this *HelloRequest) String() string
- func (m *HelloRequest) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHelloworld = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHelloworld = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterGreeterHandler ¶
func RegisterGreeterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGreeterHandler registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGreeterHandlerClient ¶
func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error
RegisterGreeterHandler registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GreeterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GreeterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GreeterClient" to call the correct interceptors.
func RegisterGreeterHandlerFromEndpoint ¶
func RegisterGreeterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGreeterHandlerFromEndpoint is same as RegisterGreeterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) }
func NewGreeterClient ¶
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
type HelloReply ¶
type HelloReply struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
The response message containing the greetings
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) Equal ¶
func (this *HelloReply) Equal(that interface{}) bool
func (*HelloReply) GetMessage ¶
func (m *HelloReply) GetMessage() string
func (*HelloReply) GoString ¶
func (this *HelloReply) GoString() string
func (*HelloReply) Marshal ¶
func (m *HelloReply) Marshal() (dAtA []byte, err error)
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) Reset ¶
func (m *HelloReply) Reset()
func (*HelloReply) Size ¶
func (m *HelloReply) Size() (n int)
func (*HelloReply) String ¶
func (this *HelloReply) String() string
func (*HelloReply) Unmarshal ¶
func (m *HelloReply) Unmarshal(dAtA []byte) error
type HelloRequest ¶
type HelloRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
The request message containing the user's name.
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) Equal ¶
func (this *HelloRequest) Equal(that interface{}) bool
func (*HelloRequest) GetName ¶
func (m *HelloRequest) GetName() string
func (*HelloRequest) GoString ¶
func (this *HelloRequest) GoString() string
func (*HelloRequest) Marshal ¶
func (m *HelloRequest) Marshal() (dAtA []byte, err error)
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) Size ¶
func (m *HelloRequest) Size() (n int)
func (*HelloRequest) String ¶
func (this *HelloRequest) String() string
func (*HelloRequest) Unmarshal ¶
func (m *HelloRequest) Unmarshal(dAtA []byte) error