Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_greeter_greeter_proto protoreflect.FileDescriptor
Functions ¶
func NewXClientForGreeter ¶
NewXClientForGreeter creates a XClient. You can configure this client with more options such as etcd registry, serialize type, select algorithm and fail mode.
func RegisterGreeterHTTPService ¶
func RegisterGreeterHTTPService(g *gin.RouterGroup, svc GreeterHTTPService)
Types ¶
type GreeterAble ¶
type GreeterAble interface { // SayHello is server rpc method as defined SayHello(ctx context.Context, args *HelloRequest, reply *HelloReply) (err error) }
================== interface skeleton ===================
type GreeterClient ¶
type GreeterClient struct {
// contains filtered or unexported fields
}
================== client stub =================== Greeter is a client wrapped XClient.
func NewGreeterClient ¶
func NewGreeterClient(xclient client.XClient) *GreeterClient
NewGreeterClient wraps a XClient as GreeterClient. You can pass a shared XClient object created by NewXClientForGreeter.
func (*GreeterClient) SayHello ¶
func (c *GreeterClient) SayHello(ctx context.Context, args *HelloRequest) (reply *HelloReply, err error)
SayHello is client rpc method as defined
type GreeterHTTPService ¶
type GreeterHTTPService interface { // SayHello ... SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
type GreeterOneClient ¶
type GreeterOneClient struct {
// contains filtered or unexported fields
}
================== oneclient stub =================== GreeterOneClient is a client wrapped oneClient.
func NewGreeterOneClient ¶
func NewGreeterOneClient(oneclient *client.OneClient) *GreeterOneClient
NewGreeterOneClient wraps a OneClient as GreeterOneClient. You can pass a shared OneClient object created by NewOneClientForGreeter.
func (*GreeterOneClient) SayHello ¶
func (c *GreeterOneClient) SayHello(ctx context.Context, args *HelloRequest) (reply *HelloReply, err error)
SayHello is client rpc method as defined
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() 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 { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() 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