RedFlag/agent/internal/system/services.go
Fimeg 67e26be2d9 projection: begin the exact-path public epoch
The public tree and its history contain only the listed paths. Earlier projection history remains preserved internally.

Source-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Policy-Sha: 913fde029b935671833254797f0f20f1eb9fabba

Tree-Digest: 180ae530c1058a2a5c89837bdce2d323ae83e669e38590ca72e75b8d92b7262f
2026-09-08 21:59:33 -04:00

22 lines
644 B
Go

package system
import "time"
type ServiceSnapshot struct {
Manager string `json:"manager"`
Services []Service `json:"services"`
Count int `json:"count"`
Running int `json:"running"`
Failed int `json:"failed"`
CollectedAt time.Time `json:"collected_at"`
}
type Service struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
LoadState string `json:"load_state,omitempty"`
ActiveState string `json:"active_state"`
SubState string `json:"sub_state,omitempty"`
}
func GetServicesSnapshot() (*ServiceSnapshot, error) { return getServicesSnapshot() }