Documentation ¶
Index ¶
- func DoCCConnectionLost(fconn iface.Iclient)
- func DoCSConnectionLost(fconn iface.Iconnection)
- func DoConnectionLost(fconn iface.Iconnection)
- func DoConnectionMade(fconn iface.Iconnection)
- func ReConnectMasterCB(fconn iface.Iclient)
- type ClusterServer
- func (this *ClusterServer) AddChild(name string, writer iface.IWriter)
- func (this *ClusterServer) AddHttpRouter(router interface{})
- func (this *ClusterServer) AddModule(mname string, apimodule interface{}, httpmodule interface{}, ...)
- func (this *ClusterServer) AddRouter(router interface{})
- func (this *ClusterServer) AddRpcRouter(router interface{})
- func (this *ClusterServer) ConnectToMaster()
- func (this *ClusterServer) ConnectToRemote(rname string)
- func (this *ClusterServer) GetRemote(name string) (*cluster.Child, error)
- func (this *ClusterServer) RemoveChild(name string)
- func (this *ClusterServer) RemoveRemote(name string)
- func (this *ClusterServer) StartClusterServer()
- func (this *ClusterServer) WaitSignal()
- type Master
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoCCConnectionLost ¶
func DoCSConnectionLost ¶
func DoCSConnectionLost(fconn iface.Iconnection)
func DoConnectionLost ¶
func DoConnectionLost(fconn iface.Iconnection)
func DoConnectionMade ¶
func DoConnectionMade(fconn iface.Iconnection)
Types ¶
type ClusterServer ¶
type ClusterServer struct { Name string RemoteNodesMgr *cluster.ChildMgr //子节点有 ChildsMgr *cluster.ChildMgr //root节点有 MasterObj *fnet.TcpClient NetServer iface.Iserver RootServer iface.Iserver TelnetServer iface.Iserver Cconf *cluster.ClusterConf sync.RWMutex // contains filtered or unexported fields }
var GlobalClusterServer *ClusterServer
func NewClusterServer ¶
func NewClusterServer(name, path string) *ClusterServer
func (*ClusterServer) AddChild ¶
func (this *ClusterServer) AddChild(name string, writer iface.IWriter)
子节点连上来回调
func (*ClusterServer) AddHttpRouter ¶
func (this *ClusterServer) AddHttpRouter(router interface{})
注册http的api到分布式服务器
func (*ClusterServer) AddModule ¶
func (this *ClusterServer) AddModule(mname string, apimodule interface{}, httpmodule interface{}, rpcmodule interface{})
注册模块到分布式服务器
func (*ClusterServer) AddRouter ¶
func (this *ClusterServer) AddRouter(router interface{})
func (*ClusterServer) AddRpcRouter ¶
func (this *ClusterServer) AddRpcRouter(router interface{})
func (*ClusterServer) ConnectToMaster ¶
func (this *ClusterServer) ConnectToMaster()
func (*ClusterServer) ConnectToRemote ¶
func (this *ClusterServer) ConnectToRemote(rname string)
func (*ClusterServer) GetRemote ¶
func (this *ClusterServer) GetRemote(name string) (*cluster.Child, error)
func (*ClusterServer) RemoveRemote ¶
func (this *ClusterServer) RemoveRemote(name string)
func (*ClusterServer) StartClusterServer ¶
func (this *ClusterServer) StartClusterServer()
func (*ClusterServer) WaitSignal ¶
func (this *ClusterServer) WaitSignal()
type Master ¶
type Master struct { OnlineNodes map[string]bool Cconf *cluster.ClusterConf Childs *cluster.ChildMgr TelnetServer iface.Iserver sync.RWMutex }
var GlobalMaster *Master
func (*Master) AddRpcRouter ¶
func (this *Master) AddRpcRouter(router interface{})
func (*Master) RemoveNode ¶
func (*Master) StartMaster ¶
func (this *Master) StartMaster()
Click to show internal directories.
Click to hide internal directories.