Documentation ¶
Index ¶
- Variables
- type AsyncResult
- type AsyncResultMgr
- type Child
- type ChildMgr
- func (this *ChildMgr) AddChild(name string, conn iface.IWriter)
- func (this *ChildMgr) GetChild(name string) (*Child, error)
- func (this *ChildMgr) GetChilds() []*Child
- func (this *ChildMgr) GetChildsByPrefix(namePrefix string) []*Child
- func (this *ChildMgr) GetRandomChild(namesuffix string) *Child
- func (this *ChildMgr) RemoveChild(name string)
- type ClusterConf
- type ClusterServerConf
- type CommandInterpreter
- type RpcClientProtocol
- func (this *RpcClientProtocol) AddRpcRouter(router interface{})
- func (this *RpcClientProtocol) GetDataPack() iface.Idatapack
- func (this *RpcClientProtocol) GetMsgHandle() iface.Imsghandle
- func (this *RpcClientProtocol) InitWorker(poolsize int32)
- func (this *RpcClientProtocol) OnConnectionLost(fconn iface.Iclient)
- func (this *RpcClientProtocol) OnConnectionMade(fconn iface.Iclient)
- func (this *RpcClientProtocol) StartReadThread(fconn iface.Iclient)
- type RpcData
- type RpcDataPack
- type RpcMsgHandle
- type RpcPackege
- type RpcRequest
- type RpcServerProtocol
- func (this *RpcServerProtocol) AddRpcRouter(router interface{})
- func (this *RpcServerProtocol) GetDataPack() iface.Idatapack
- func (this *RpcServerProtocol) GetMsgHandle() iface.Imsghandle
- func (this *RpcServerProtocol) InitWorker(poolsize int32)
- func (this *RpcServerProtocol) OnConnectionLost(fconn iface.Iconnection)
- func (this *RpcServerProtocol) OnConnectionMade(fconn iface.Iconnection)
- func (this *RpcServerProtocol) StartReadThread(fconn iface.Iconnection)
- type RpcSignal
- type TelnetProtocol
- func (this *TelnetProtocol) AddRpcRouter(router interface{})
- func (this *TelnetProtocol) GetDataPack() iface.Idatapack
- func (this *TelnetProtocol) GetMsgHandle() iface.Imsghandle
- func (this *TelnetProtocol) InitWorker(poolsize int32)
- func (this *TelnetProtocol) OnConnectionLost(fconn iface.Iconnection)
- func (this *TelnetProtocol) OnConnectionMade(fconn iface.Iconnection)
- func (this *TelnetProtocol) StartReadThread(fconn iface.Iconnection)
- type XingoRpc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
QUIT_CMD = [3]string{"quit", "q", "exit"}
)
Functions ¶
This section is empty.
Types ¶
type AsyncResult ¶
type AsyncResult struct {
// contains filtered or unexported fields
}
func NewAsyncResult ¶
func NewAsyncResult(key string) *AsyncResult
func (*AsyncResult) GetKey ¶
func (this *AsyncResult) GetKey() string
func (*AsyncResult) GetResult ¶
func (this *AsyncResult) GetResult(timeout time.Duration) (*RpcData, error)
func (*AsyncResult) SetResult ¶
func (this *AsyncResult) SetResult(data *RpcData)
type AsyncResultMgr ¶
var AResultGlobalObj *AsyncResultMgr = NewAsyncResultMgr()
func NewAsyncResultMgr ¶
func NewAsyncResultMgr() *AsyncResultMgr
func (*AsyncResultMgr) Add ¶
func (this *AsyncResultMgr) Add() *AsyncResult
func (*AsyncResultMgr) FillAsyncResult ¶
func (this *AsyncResultMgr) FillAsyncResult(key string, data *RpcData) error
func (*AsyncResultMgr) GetAsyncResult ¶
func (this *AsyncResultMgr) GetAsyncResult(key string) (*AsyncResult, error)
func (*AsyncResultMgr) Remove ¶
func (this *AsyncResultMgr) Remove(key string)
type Child ¶
type Child struct {
// contains filtered or unexported fields
}
func (*Child) CallChildForResult ¶
func (*Child) CallChildNotForResult ¶
type ChildMgr ¶
func NewChildMgr ¶
func NewChildMgr() *ChildMgr
func (*ChildMgr) GetChildsByPrefix ¶
func (*ChildMgr) GetRandomChild ¶
func (*ChildMgr) RemoveChild ¶
type ClusterConf ¶
type ClusterConf struct { Master *ClusterServerConf Servers map[string]*ClusterServerConf }
func NewClusterConf ¶
func NewClusterConf(path string) (*ClusterConf, error)
func (*ClusterConf) GetChildsByName ¶
func (this *ClusterConf) GetChildsByName(name string) []string
获取当前节点的子节点
func (*ClusterConf) GetRemotesByName ¶
func (this *ClusterConf) GetRemotesByName(name string) ([]string, error)
获取当前节点的父节点
func (*ClusterConf) Reload ¶
func (this *ClusterConf) Reload()
type ClusterServerConf ¶
type CommandInterpreter ¶
type CommandInterpreter struct {
// contains filtered or unexported fields
}
func NewCommandInterpreter ¶
func NewCommandInterpreter() *CommandInterpreter
func (*CommandInterpreter) AddCommand ¶
func (this *CommandInterpreter) AddCommand(cmd iface.ICommand)
func (*CommandInterpreter) Excute ¶
func (this *CommandInterpreter) Excute(rawCmdExp string) string
func (*CommandInterpreter) IsQuitCmd ¶
func (this *CommandInterpreter) IsQuitCmd(rawCmdExp string) bool
type RpcClientProtocol ¶
type RpcClientProtocol struct {
// contains filtered or unexported fields
}
func NewRpcClientProtocol ¶
func NewRpcClientProtocol() *RpcClientProtocol
func (*RpcClientProtocol) AddRpcRouter ¶
func (this *RpcClientProtocol) AddRpcRouter(router interface{})
func (*RpcClientProtocol) GetDataPack ¶
func (this *RpcClientProtocol) GetDataPack() iface.Idatapack
func (*RpcClientProtocol) GetMsgHandle ¶
func (this *RpcClientProtocol) GetMsgHandle() iface.Imsghandle
func (*RpcClientProtocol) InitWorker ¶
func (this *RpcClientProtocol) InitWorker(poolsize int32)
func (*RpcClientProtocol) OnConnectionLost ¶
func (this *RpcClientProtocol) OnConnectionLost(fconn iface.Iclient)
func (*RpcClientProtocol) OnConnectionMade ¶
func (this *RpcClientProtocol) OnConnectionMade(fconn iface.Iclient)
func (*RpcClientProtocol) StartReadThread ¶
func (this *RpcClientProtocol) StartReadThread(fconn iface.Iclient)
type RpcDataPack ¶
type RpcDataPack struct{}
func NewRpcDataPack ¶
func NewRpcDataPack() *RpcDataPack
func (*RpcDataPack) GetHeadLen ¶
func (this *RpcDataPack) GetHeadLen() int32
func (*RpcDataPack) Pack ¶
func (this *RpcDataPack) Pack(msgId uint32, pkg interface{}) (out []byte, err error)
func (*RpcDataPack) Unpack ¶
func (this *RpcDataPack) Unpack(headdata []byte) (interface{}, error)
type RpcMsgHandle ¶
type RpcMsgHandle struct { PoolSize int32 TaskQueue []chan *RpcRequest Apis map[string]reflect.Value }
func NewRpcMsgHandle ¶
func NewRpcMsgHandle() *RpcMsgHandle
func (*RpcMsgHandle) AddRouter ¶
func (this *RpcMsgHandle) AddRouter(router interface{})
func (*RpcMsgHandle) DeliverToMsgQueue ¶
func (this *RpcMsgHandle) DeliverToMsgQueue(pkg interface{})
func (*RpcMsgHandle) DoMsgFromGoRoutine ¶
func (this *RpcMsgHandle) DoMsgFromGoRoutine(pkg interface{})
func (*RpcMsgHandle) StartWorkerLoop ¶
func (this *RpcMsgHandle) StartWorkerLoop(poolSize int)
type RpcPackege ¶
type RpcRequest ¶
type RpcServerProtocol ¶
type RpcServerProtocol struct {
// contains filtered or unexported fields
}
func NewRpcServerProtocol ¶
func NewRpcServerProtocol() *RpcServerProtocol
func (*RpcServerProtocol) AddRpcRouter ¶
func (this *RpcServerProtocol) AddRpcRouter(router interface{})
func (*RpcServerProtocol) GetDataPack ¶
func (this *RpcServerProtocol) GetDataPack() iface.Idatapack
func (*RpcServerProtocol) GetMsgHandle ¶
func (this *RpcServerProtocol) GetMsgHandle() iface.Imsghandle
func (*RpcServerProtocol) InitWorker ¶
func (this *RpcServerProtocol) InitWorker(poolsize int32)
func (*RpcServerProtocol) OnConnectionLost ¶
func (this *RpcServerProtocol) OnConnectionLost(fconn iface.Iconnection)
func (*RpcServerProtocol) OnConnectionMade ¶
func (this *RpcServerProtocol) OnConnectionMade(fconn iface.Iconnection)
func (*RpcServerProtocol) StartReadThread ¶
func (this *RpcServerProtocol) StartReadThread(fconn iface.Iconnection)
type TelnetProtocol ¶
type TelnetProtocol struct{}
func NewTelnetProtocol ¶
func NewTelnetProtocol() *TelnetProtocol
func (*TelnetProtocol) AddRpcRouter ¶
func (this *TelnetProtocol) AddRpcRouter(router interface{})
func (*TelnetProtocol) GetDataPack ¶
func (this *TelnetProtocol) GetDataPack() iface.Idatapack
func (*TelnetProtocol) GetMsgHandle ¶
func (this *TelnetProtocol) GetMsgHandle() iface.Imsghandle
func (*TelnetProtocol) InitWorker ¶
func (this *TelnetProtocol) InitWorker(poolsize int32)
func (*TelnetProtocol) OnConnectionLost ¶
func (this *TelnetProtocol) OnConnectionLost(fconn iface.Iconnection)
func (*TelnetProtocol) OnConnectionMade ¶
func (this *TelnetProtocol) OnConnectionMade(fconn iface.Iconnection)
func (*TelnetProtocol) StartReadThread ¶
func (this *TelnetProtocol) StartReadThread(fconn iface.Iconnection)
type XingoRpc ¶
type XingoRpc struct {
// contains filtered or unexported fields
}
func NewXingoRpc ¶
func (*XingoRpc) CallRpcForResult ¶
func (*XingoRpc) CallRpcNotForResult ¶
Click to show internal directories.
Click to hide internal directories.