Documentation ¶
Index ¶
- Variables
- func NewServer(opts ...*options.ServerOptions) *server
- type Call
- type Client
- func (this *Client) Call(server string, moduleFunc string, req, ret any, opts ...*options.SendOptions) error
- func (this *Client) CallFunc(server string, function string, req, ret any, opts ...*options.SendOptions) error
- func (this *Client) Go(server string, moduleFunc string, req, ret any, done chan *Call, ...) *Call
- func (this *Client) Register(rcvr any) error
- func (this *Client) RegisterFunc(funcname string, function any) error
- func (this *Client) RegisterName(name string, rcvr any) error
- func (this *Client) Send(server, moduleFunc string, v any, opts ...*options.SendOptions) error
- func (this *Client) SendFile(server string, moduleFunc string, filename string, reader io.Reader, ...) error
- func (this *Client) StopHeart()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VerifyError = errors.New("Client VerifyError") ReadError = errors.New("Client ReadError") WriteError = errors.New("Client WriteError") ModuleFuncError = errors.New("Client ModuleFunc must like rpc.func") ServerError = errors.New("ServerError") FuncError = errors.New("FuncError") ReqTimeOutError = errors.New("ReqTimeoutError") )
Functions ¶
func NewServer ¶
func NewServer(opts ...*options.ServerOptions) *server
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
1. service - func_module -> anonymity_func 1. service - module -> func
func (*Client) Call ¶
func (this *Client) Call(server string, moduleFunc string, req, ret any, opts ...*options.SendOptions) error
对外的方法 sync
func (*Client) Go ¶
func (this *Client) Go(server string, moduleFunc string, req, ret any, done chan *Call, opts ...*options.SendOptions) *Call
async
func (*Client) RegisterFunc ¶ added in v1.0.11
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
copy
|
copy |
目前这个性能最好,不在乎其内部结构是否缺少 msgp 是msgpack的代码生成实现 vmihailenco/msgpack 是msgpack的非代码实现,这2个玩意儿是兼容的
|
目前这个性能最好,不在乎其内部结构是否缺少 msgp 是msgpack的代码生成实现 vmihailenco/msgpack 是msgpack的非代码实现,这2个玩意儿是兼容的 |
Click to show internal directories.
Click to hide internal directories.