idlrpc

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 12 Imported by: 5

Documentation

Index

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 OnMessage

func OnMessage(trans transport.Transport, ctx context.Context)

消息处理逻辑

func RegisterProxy

func RegisterProxy(proxy stub.ProxyStub) error

@title 添加服务 @detail TODO 这里应该是需要从zookeeper获取对应是ip端口的 没有的话第一次要主动建立

func RegisterService

func RegisterService(uuid uint64, srvstub stub.SrvStub, impl interface{}) error

@title 注册服务的实现到stub

func Start

func Start()

func Tick

func Tick()

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) OnConnect

func (rc *RpcConnHandle) OnConnect(conn net.IdlConn) bool

func (*RpcConnHandle) OnRecv

func (rc *RpcConnHandle) OnRecv(pkg []byte) bool

func (*RpcConnHandle) Tick

func (rc *RpcConnHandle) Tick() int

type RpcListenHandle

type RpcListenHandle struct {
}

func (*RpcListenHandle) OnAccept

func (rpc *RpcListenHandle) OnAccept(conn net.IdlConn) bool

Directories

Path Synopsis
goidltool module
idl2go module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL