Documentation ¶
Index ¶
- func Call(stubid, methodid, retry, timeout uint32, message proto.Message) (resp *protocol.ResponsePackage, err error)
- func GetClientStubMgr() *stub.ClientStubMgr
- func GetConnMaps() *map[uint64]*RpcConnHandle
- func GetServerStubMgr() *stub.StubManager
- func GetStubCallMgr() *stubcall.SrvStubCallMgr
- func OnMessage(trans transport.Transport, ctx context.Context)
- func RegisterProxy(proxy stub.ProxyStub) error
- func RegisterService(uuid uint64, srvstub stub.SrvStub, impl interface{}) error
- func Start()
- func Tick()
- type RpcConnHandle
- type RpcListenHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(stubid, methodid, retry, timeout uint32, message proto.Message) (resp *protocol.ResponsePackage, err error)
@title 客户端调用rpc使用 @detail 阻塞方法
func GetClientStubMgr ¶
func GetClientStubMgr() *stub.ClientStubMgr
func GetConnMaps ¶
func GetConnMaps() *map[uint64]*RpcConnHandle
func GetServerStubMgr ¶
func GetServerStubMgr() *stub.StubManager
func GetStubCallMgr ¶
func GetStubCallMgr() *stubcall.SrvStubCallMgr
func RegisterProxy ¶
@title 添加服务 @detail TODO 这里应该是需要从zookeeper获取对应是ip端口的 没有的话第一次要主动建立
func RegisterService ¶
@title 注册服务的实现到stub
Types ¶
type RpcConnHandle ¶
type RpcConnHandle struct {
// contains filtered or unexported fields
}
func (*RpcConnHandle) GetTrans ¶
func (rc *RpcConnHandle) GetTrans() transport.Transport
func (*RpcConnHandle) OnClose ¶
func (rc *RpcConnHandle) OnClose()
func (*RpcConnHandle) OnRecv ¶
func (rc *RpcConnHandle) OnRecv(pkg []byte) bool
func (*RpcConnHandle) Tick ¶
func (rc *RpcConnHandle) Tick() int
type RpcListenHandle ¶
type RpcListenHandle struct { }
Click to show internal directories.
Click to hide internal directories.