优化etcd发现服务,支持记录附加信息rpc

This commit is contained in:
boyce
2024-04-19 16:39:57 +08:00
parent a26210f17f
commit e36693eeff
7 changed files with 278 additions and 108 deletions

View File

@@ -77,6 +77,17 @@ type DiscoveryServiceEvent struct{
NodeId string
}
type EtcdServiceRecordEvent struct {
NetworkName string
TTLSecond int64
RecordKey string
RecordInfo string
}
type Empty struct {
}
func SetMaxServiceChannel(maxEventChannel int){
maxServiceEventChannelNum = maxEventChannel
}
@@ -410,4 +421,4 @@ func (s *Service) SetGoRoutineNum(goroutineNum int32) bool {
}
func (s *Service) OnRetire(){
}
}