Documentation ¶
Index ¶
- func NewClientOpts(opts ...client.Option) *client.Options
- func NewServer(opts ...server.Option) *server.Server
- type Client
- func (c *Client) Call(methodName string, req ...interface{}) (interface{}, error)
- func (c *Client) CallWithReturnValue(methodName string, rep interface{}, req ...interface{}) error
- func (c *Client) Invoke(ctx context.Context, req, rep interface{}, option ...client.Option) error
- func (c *Client) Method(name string) Method
- func (c *Client) Service(name string)
- func (c *Client) ServiceAndMethod(name string) (Method, error)
- type Method
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientOpts ¶
NewClientOpts 创建client的配置.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithOpts ¶
NewClientWithOpts 通过client的配置生成Client进行调用.
func (*Client) CallWithReturnValue ¶
CallWithReturnValue 将返回值传入进行调用,可以直接解析出返回值,而不需要再进行类型断言. rep 可以为任意形式参数,并不局限于结构体.
Click to show internal directories.
Click to hide internal directories.