mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 22:27:29 +08:00
Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
@@ -278,3 +278,25 @@ func (r *Reconciler) getAuthOption(registry *apiv1.RegistryConfig) (AuthOption,
|
||||
|
||||
return authOption, nil
|
||||
}
|
||||
|
||||
type RegistryWatcherStatus struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Healthy bool `json:"healthy"`
|
||||
Ready bool `json:"ready"`
|
||||
}
|
||||
|
||||
func (r *Reconciler) GetRegistryWatcherStatusList() []RegistryWatcherStatus {
|
||||
var registryStatusList []RegistryWatcherStatus
|
||||
for key, watcher := range r.watchers {
|
||||
_, name := path.Split(key)
|
||||
registryStatus := RegistryWatcherStatus{
|
||||
Name: name,
|
||||
Type: watcher.GetRegistryType(),
|
||||
Healthy: watcher.IsHealthy(),
|
||||
Ready: watcher.IsReady(),
|
||||
}
|
||||
registryStatusList = append(registryStatusList, registryStatus)
|
||||
}
|
||||
return registryStatusList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user