Documentation
¶
Index ¶
- func NewGoroutineControl(size uint32) mqrpc.GoroutineControl
- func NewRPCClient(session app.IServerSession) (mqrpc.RPCClient, error)
- func NewRPCServer(module app.IModule) (mqrpc.RPCServer, error)
- type ClinetCallInfo
- type GtControl
- type NatsClient
- func (c *NatsClient) Call(callInfo *mqrpc.CallInfo, callback chan *core.ResultInfo) error
- func (c *NatsClient) CallNR(callInfo *mqrpc.CallInfo) error
- func (c *NatsClient) CloseFch(fch chan *core.ResultInfo)
- func (c *NatsClient) Delete(key string) (err error)
- func (c *NatsClient) Done() (err error)
- func (c *NatsClient) Marshal(rpcInfo *core.RPCInfo) ([]byte, error)
- func (c *NatsClient) Unmarshal(data []byte) (*core.RPCInfo, error)
- func (c *NatsClient) UnmarshalResult(data []byte) (*core.ResultInfo, error)
- type NatsServer
- type RPCClient
- func (c *RPCClient) Call(ctx context.Context, _func string, params ...any) (any, error)
- func (c *RPCClient) CallArgs(ctx context.Context, _func string, argTypes []string, argDatas [][]byte) (any, error)
- func (c *RPCClient) CallNR(ctx context.Context, _func string, params ...any) (err error)
- func (c *RPCClient) CallNRArgs(ctx context.Context, _func string, argTypes []string, argDatas [][]byte) (err error)
- func (c *RPCClient) Done() (err error)
- type RPCServer
- func (s *RPCServer) Addr() string
- 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 any)
- func (s *RPCServer) RegisterGO(id string, f any)
- func (s *RPCServer) SetGoroutineControl(control mqrpc.GoroutineControl)
- func (s *RPCServer) SetListener(listener mqrpc.RPCListener)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoroutineControl ¶
func NewGoroutineControl(size uint32) mqrpc.GoroutineControl
func NewRPCClient ¶
func NewRPCClient(session app.IServerSession) (mqrpc.RPCClient, error)
Types ¶
type ClinetCallInfo ¶
type ClinetCallInfo struct {
// contains filtered or unexported fields
}
type NatsClient ¶
type NatsClient struct {
// contains filtered or unexported fields
}
func NewNatsClient ¶
func NewNatsClient(session app.IServerSession) (client *NatsClient, err error)
func (*NatsClient) Call ¶
func (c *NatsClient) Call(callInfo *mqrpc.CallInfo, callback chan *core.ResultInfo) error
* 消息请求
func (*NatsClient) CallNR ¶
func (c *NatsClient) CallNR(callInfo *mqrpc.CallInfo) error
* 消息请求 不需要回复
func (*NatsClient) CloseFch ¶
func (c *NatsClient) CloseFch(fch chan *core.ResultInfo)
func (*NatsClient) Delete ¶
func (c *NatsClient) Delete(key string) (err error)
func (*NatsClient) Done ¶
func (c *NatsClient) Done() (err error)
func (*NatsClient) Marshal ¶
func (c *NatsClient) Marshal(rpcInfo *core.RPCInfo) ([]byte, error)
goroutine safe
func (*NatsClient) UnmarshalResult ¶
func (c *NatsClient) UnmarshalResult(data []byte) (*core.ResultInfo, error)
type NatsServer ¶
type NatsServer struct {
// contains filtered or unexported fields
}
func NewNatsServer ¶
func NewNatsServer(s *RPCServer) (*NatsServer, error)
func (*NatsServer) Addr ¶
func (s *NatsServer) Addr() string
func (*NatsServer) MarshalResult ¶
func (s *NatsServer) MarshalResult(resultInfo *core.ResultInfo) ([]byte, error)
goroutine safe
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func (*RPCClient) CallNRArgs ¶
type RPCServer ¶
type RPCServer struct {
// contains filtered or unexported fields
}
func (*RPCServer) RegisterGO ¶
you must call the function before calling Open and Go
func (*RPCServer) SetGoroutineControl ¶
func (s *RPCServer) SetGoroutineControl(control mqrpc.GoroutineControl)
func (*RPCServer) SetListener ¶
func (s *RPCServer) SetListener(listener mqrpc.RPCListener)
Click to show internal directories.
Click to hide internal directories.