Documentation ¶
Index ¶
- type ClientStubCall
- func (cs *ClientStubCall) DecrRetryTime()
- func (cs *ClientStubCall) Done() <-chan *protocol.ResponsePackage
- func (cs *ClientStubCall) GetCallID() uint32
- func (cs *ClientStubCall) GetErrorCode() uint32
- func (cs *ClientStubCall) GetMethodId() uint32
- func (cs *ClientStubCall) GetRetryTime() uint32
- func (cs *ClientStubCall) GetSendData() []byte
- func (cs *ClientStubCall) GetStubID() uint32
- func (cs *ClientStubCall) GetTimeOut() uint32
- func (cs *ClientStubCall) Ret(resp *protocol.ResponsePackage)
- func (cs *ClientStubCall) SetErrorCode(code uint32)
- func (cs *ClientStubCall) SetMethodId(method uint32)
- func (cs *ClientStubCall) SetSendData(pkg []byte)
- type ClientStubCallMgr
- type SrvStubCall
- func (sc *SrvStubCall) GetClientCallID() uint32
- func (sc *SrvStubCall) GetMethodID() uint32
- func (sc *SrvStubCall) GetReqData() *protocol.RequestPackage
- func (sc *SrvStubCall) GetServerCallID() uint32
- func (sc *SrvStubCall) GetServiceID() uint32
- func (sc *SrvStubCall) GetTransportID() transport.Transport
- func (sc *SrvStubCall) SetReqData(req *protocol.RequestPackage)
- type SrvStubCallMgr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientStubCall ¶
type ClientStubCall struct {
// contains filtered or unexported fields
}
@title 客户端调用远程调用过程存根
func NewClientStubCall ¶
func NewClientStubCall(stubID, retry, timeout uint32) *ClientStubCall
func (*ClientStubCall) Done ¶
func (cs *ClientStubCall) Done() <-chan *protocol.ResponsePackage
func (*ClientStubCall) GetCallID ¶
func (cs *ClientStubCall) GetCallID() uint32
func (*ClientStubCall) GetErrorCode ¶
func (cs *ClientStubCall) GetErrorCode() uint32
func (*ClientStubCall) GetMethodId ¶
func (cs *ClientStubCall) GetMethodId() uint32
func (*ClientStubCall) GetRetryTime ¶
func (cs *ClientStubCall) GetRetryTime() uint32
func (*ClientStubCall) GetSendData ¶
func (cs *ClientStubCall) GetSendData() []byte
func (*ClientStubCall) GetTimeOut ¶
func (cs *ClientStubCall) GetTimeOut() uint32
@title 获取超时时间 单位毫秒
func (*ClientStubCall) Ret ¶
func (cs *ClientStubCall) Ret(resp *protocol.ResponsePackage)
@title @detail 这里我对于我的代码有疑问我是通过接口唤醒相关的stub 这里似乎并不需要持有实现接口? 但是我应该怎么做才能唤醒我对应的代码那? 通过chan 唤醒阻塞的协程
func (*ClientStubCall) SetErrorCode ¶
func (cs *ClientStubCall) SetErrorCode(code uint32)
func (*ClientStubCall) SetMethodId ¶
func (cs *ClientStubCall) SetMethodId(method uint32)
func (*ClientStubCall) SetSendData ¶
func (cs *ClientStubCall) SetSendData(pkg []byte)
type ClientStubCallMgr ¶
type ClientStubCallMgr struct {
// contains filtered or unexported fields
}
func NewClientStubCallMgr ¶
func NewClientStubCallMgr() *ClientStubCallMgr
func (*ClientStubCallMgr) Add ¶
func (csm *ClientStubCallMgr) Add(call *ClientStubCall) *ClientStubCall
@title stubcall 管理器
func (*ClientStubCallMgr) CleanUp ¶
func (csm *ClientStubCallMgr) CleanUp()
func (*ClientStubCallMgr) Destory ¶
func (csm *ClientStubCallMgr) Destory(callID uint32)
func (*ClientStubCallMgr) GetClientStubCall ¶
func (csm *ClientStubCallMgr) GetClientStubCall(callID uint32) *ClientStubCall
func (*ClientStubCallMgr) RemoveAll ¶
func (csm *ClientStubCallMgr) RemoveAll(srvID uint32)
type SrvStubCall ¶
type SrvStubCall struct {
// contains filtered or unexported fields
}
@title 远端调用存根,用于调度
func NewSrvStubCall ¶
func NewSrvStubCall(serviceUUID uint64, srvID, callID, methodID uint32, trans transport.Transport) *SrvStubCall
func (*SrvStubCall) GetMethodID ¶
func (sc *SrvStubCall) GetMethodID() uint32
func (*SrvStubCall) GetReqData ¶
func (sc *SrvStubCall) GetReqData() *protocol.RequestPackage
func (*SrvStubCall) GetServiceID ¶
func (sc *SrvStubCall) GetServiceID() uint32
func (*SrvStubCall) GetTransportID ¶
func (sc *SrvStubCall) GetTransportID() transport.Transport
func (*SrvStubCall) SetReqData ¶
func (sc *SrvStubCall) SetReqData(req *protocol.RequestPackage)
type SrvStubCallMgr ¶
type SrvStubCallMgr struct {
// contains filtered or unexported fields
}
@title stubcall 管理器
func NewSrvStubCallMgr ¶
func NewSrvStubCallMgr() *SrvStubCallMgr
func (*SrvStubCallMgr) AddCall ¶
func (scm *SrvStubCallMgr) AddCall(call *SrvStubCall) bool
func (*SrvStubCallMgr) DestroyCall ¶
func (scm *SrvStubCallMgr) DestroyCall(callid uint32)
func (*SrvStubCallMgr) GetCall ¶
func (scm *SrvStubCallMgr) GetCall(callid uint32) *SrvStubCall
func (*SrvStubCallMgr) Tick ¶
func (scm *SrvStubCallMgr) Tick()
Click to show internal directories.
Click to hide internal directories.