fix(auth): harden unified diagnostic execution
This commit is contained in:
@@ -97,6 +97,20 @@ func CoreRunning(value string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// CoreHealthy reports whether core is both running and certified healthy by Compose.
|
||||
func CoreHealthy(value string) (bool, error) {
|
||||
statuses, err := parseStatuses(value)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
for _, item := range statuses {
|
||||
if item.Service == "core" {
|
||||
return strings.EqualFold(item.State, "running") && strings.EqualFold(item.Health, "healthy"), nil
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Healthy verifies the full expected Compose service set, including the one-shot model initializer.
|
||||
func Healthy(value string) error {
|
||||
statuses, err := parseStatuses(value)
|
||||
|
||||
Reference in New Issue
Block a user