feature: add registry watcherStatus endpoint (#913) (#915)

Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
韩贤涛
2024-04-24 10:39:41 +08:00
committed by GitHub
parent e68b5c86c4
commit a787088c0e
6 changed files with 78 additions and 4 deletions

View File

@@ -678,7 +678,7 @@ func (w *watcher) Run() {
select {
case <-ticker.C:
var needNewFetch bool
if w.IsReady() {
if w.watcherReady() {
w.Ready(true)
needNewFetch = true
}
@@ -727,7 +727,7 @@ func (w *watcher) GetRegistryType() string {
return w.RegistryType.String()
}
func (w *watcher) IsReady() bool {
func (w *watcher) watcherReady() bool {
if w.serviceRemaind == nil {
return true
}