重构并新增结点服务发现接口

This commit is contained in:
boyce
2020-10-17 20:05:56 +08:00
parent f60f4670c3
commit 8fc24a8653
7 changed files with 304 additions and 168 deletions

View File

@@ -0,0 +1,15 @@
package cluster
type OperType int
type FunDelNode func (nodeId int)
type FunSetNodeInfo func(nodeInfo *NodeInfo)
type IServiceDiscovery interface {
Init(localNodeId int) error
OnNodeStop()
RegFunDelNode(funDelNode FunDelNode)
RegFunSetNode(funSetNodeInfo FunSetNodeInfo)
}