Documentation ¶
Index ¶
- Variables
- func GreeterService_HelloAgain_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func GreeterService_Hello_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func RegisterGreeterService(s server.Service, svr GreeterService)
- type GreeterClientProxy
- type GreeterClientProxyImpl
- type GreeterService
- type HelloReply
- type HelloRequest
- type UnimplementedGreeter
Constants ¶
This section is empty.
Variables ¶
View Source
var File_helloworld_proto protoreflect.FileDescriptor
View Source
var GreeterServer_ServiceDesc = server.ServiceDesc{ ServiceName: "trpc.helloworld.Greeter", HandlerType: ((*GreeterService)(nil)), Methods: []server.Method{ { Name: "/trpc.helloworld.Greeter/Hello", Func: GreeterService_Hello_Handler, }, { Name: "/trpc.helloworld.Greeter/HelloAgain", Func: GreeterService_HelloAgain_Handler, }, }, }
GreeterServer_ServiceDesc descriptor for server.RegisterService.
View Source
var NewGreeterClientProxy = func(opts ...client.Option) GreeterClientProxy { return &GreeterClientProxyImpl{client: client.DefaultClient, opts: opts} }
Functions ¶
func GreeterService_HelloAgain_Handler ¶
func GreeterService_HelloAgain_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func GreeterService_Hello_Handler ¶
func GreeterService_Hello_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func RegisterGreeterService ¶
func RegisterGreeterService(s server.Service, svr GreeterService)
RegisterGreeterService registers service.
Types ¶
type GreeterClientProxy ¶
type GreeterClientProxy interface { Hello(ctx context.Context, req *HelloRequest, opts ...client.Option) (rsp *HelloReply, err error) HelloAgain(ctx context.Context, req *HelloRequest, opts ...client.Option) (rsp *HelloReply, err error) }
GreeterClientProxy defines service client proxy
type GreeterClientProxyImpl ¶
type GreeterClientProxyImpl struct {
// contains filtered or unexported fields
}
func (*GreeterClientProxyImpl) Hello ¶
func (c *GreeterClientProxyImpl) Hello(ctx context.Context, req *HelloRequest, opts ...client.Option) (*HelloReply, error)
func (*GreeterClientProxyImpl) HelloAgain ¶
func (c *GreeterClientProxyImpl) HelloAgain(ctx context.Context, req *HelloRequest, opts ...client.Option) (*HelloReply, error)
type GreeterService ¶
type GreeterService interface { Hello(ctx context.Context, req *HelloRequest) (*HelloReply, error) HelloAgain(ctx context.Context, req *HelloRequest) (*HelloReply, error) }
GreeterService defines service.
type HelloReply ¶
type HelloReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMsg ¶
func (x *HelloReply) GetMsg() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMsg ¶
func (x *HelloRequest) GetMsg() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type UnimplementedGreeter ¶
type UnimplementedGreeter struct{}
func (*UnimplementedGreeter) Hello ¶
func (s *UnimplementedGreeter) Hello(ctx context.Context, req *HelloRequest) (*HelloReply, error)
func (*UnimplementedGreeter) HelloAgain ¶
func (s *UnimplementedGreeter) HelloAgain(ctx context.Context, req *HelloRequest) (*HelloReply, error)
Click to show internal directories.
Click to hide internal directories.