mirror of
https://github.com/duanhf2012/origin.git
synced 2026-05-14 11:47:33 +08:00
优化origin默认模式的服务发现
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
"github.com/duanhf2012/origin/v2/event"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -65,12 +66,19 @@ type RpcHandler struct {
|
||||
pClientList []*Client
|
||||
}
|
||||
|
||||
type TriggerRpcConnEvent func(bConnect bool, clientSeq uint32, nodeId string)
|
||||
type INodeListener interface {
|
||||
//type TriggerRpcConnEvent func(bConnect bool, clientSeq uint32, nodeId string)
|
||||
type NotifyEventToAllService func(event event.IEvent)
|
||||
|
||||
type INodeConnListener interface {
|
||||
OnNodeConnected(nodeId string)
|
||||
OnNodeDisconnect(nodeId string)
|
||||
}
|
||||
|
||||
type INatsConnListener interface {
|
||||
OnNatsConnected()
|
||||
OnNatsDisconnect()
|
||||
}
|
||||
|
||||
type IDiscoveryServiceListener interface {
|
||||
OnDiscoveryService(nodeId string, serviceName []string)
|
||||
OnUnDiscoveryService(nodeId string)
|
||||
|
||||
Reference in New Issue
Block a user