新增服务发现事件监听

This commit is contained in:
orgin
2022-07-07 13:38:38 +08:00
parent 77988906f8
commit 769f680b17
6 changed files with 128 additions and 14 deletions

View File

@@ -68,11 +68,16 @@ type RpcHandler struct {
}
type TriggerRpcEvent func(bConnect bool, clientSeq uint32, nodeId int)
type IRpcListener interface {
type INodeListener interface {
OnNodeConnected(nodeId int)
OnNodeDisconnect(nodeId int)
}
type IDiscoveryServiceListener interface {
OnDiscoveryService(nodeId int, serviceName []string)
OnUnDiscoveryService(nodeId int, serviceName []string)
}
type IRpcHandler interface {
IRpcHandlerChannel
GetName() string