Versions in this module Expand all Collapse all v1 v1.2.1 Mar 15, 2020 Changes in this version + func NewRPCClient(app module.App, session module.ServerSession) (mqrpc.RPCClient, error) + func NewRPCServer(app module.App, module module.Module) (mqrpc.RPCServer, error) + type ClinetCallInfo struct + type NatsClient struct + func NewNatsClient(app module.App, session module.ServerSession) (client *NatsClient, err error) + func (c *NatsClient) Call(callInfo mqrpc.CallInfo, callback chan rpcpb.ResultInfo) error + func (c *NatsClient) CallNR(callInfo mqrpc.CallInfo) error + func (c *NatsClient) CloseFch(fch chan rpcpb.ResultInfo) + func (c *NatsClient) Delete(key string) (err error) + func (c *NatsClient) Done() (err error) + func (c *NatsClient) Marshal(rpcInfo *rpcpb.RPCInfo) ([]byte, error) + func (c *NatsClient) Unmarshal(data []byte) (*rpcpb.RPCInfo, error) + func (c *NatsClient) UnmarshalResult(data []byte) (*rpcpb.ResultInfo, error) + type NatsServer struct + func NewNatsServer(app module.App, s *RPCServer) (*NatsServer, error) + func (s *NatsServer) Addr() string + func (s *NatsServer) Callback(callinfo mqrpc.CallInfo) error + func (s *NatsServer) MarshalResult(resultInfo rpcpb.ResultInfo) ([]byte, error) + func (s *NatsServer) Shutdown() (err error) + func (s *NatsServer) Unmarshal(data []byte) (*rpcpb.RPCInfo, error) + type RPCClient struct + func (c *RPCClient) Call(ctx context.Context, _func string, params ...interface{}) (interface{}, string) + func (c *RPCClient) CallArgs(ctx context.Context, _func string, ArgsType []string, args [][]byte) (r interface{}, e string) + func (c *RPCClient) CallNR(_func string, params ...interface{}) (err error) + func (c *RPCClient) CallNRArgs(_func string, ArgsType []string, args [][]byte) (err error) + func (c *RPCClient) Done() (err error) + type RPCServer struct + func (s *RPCServer) Call(callInfo mqrpc.CallInfo) error + func (s *RPCServer) Done() (err error) + func (s *RPCServer) GetExecuting() int64 + func (s *RPCServer) Register(id string, f interface{}) + func (s *RPCServer) RegisterGO(id string, f interface{}) + func (s *RPCServer) SetGoroutineControl(control mqrpc.GoroutineControl) + func (s *RPCServer) SetListener(listener mqrpc.RPCListener) + func (this *RPCServer) Addr() string