优化筛选服务发现---支持对指定主master结点进行筛选

This commit is contained in:
duanhf2012
2023-09-22 15:43:41 +08:00
parent 2d1bee4dea
commit 3f52ea8331
2 changed files with 42 additions and 45 deletions

View File

@@ -20,6 +20,11 @@ const (
Discard NodeStatus = 1 //丢弃
)
type MasterDiscoveryService struct {
MasterNodeId int32 //要筛选的主结点Id如果不配置或者配置成0表示针对所有的主结点
DiscoveryService []string //只发现的服务列表
}
type NodeInfo struct {
NodeId int
NodeName string
@@ -29,8 +34,7 @@ type NodeInfo struct {
CompressBytesLen int //超过字节进行压缩的长度
ServiceList []string //所有的有序服务列表
PublicServiceList []string //对外公开的服务列表
DiscoveryService []string //筛选发现的服务,如果不配置,不进行筛选
NeighborService []string
MasterDiscoveryService []MasterDiscoveryService //筛选发现的服务,如果不配置,不进行筛选
status NodeStatus
}