mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
重构并新增结点服务发现接口
This commit is contained in:
15
cluster/servicediscovery.go
Normal file
15
cluster/servicediscovery.go
Normal 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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user