rdev/internal/domain/external_health.go
jordan 210064d490 feat: add diagnostics endpoint and external health monitoring
- Add /diagnostics endpoint for system health overview
- Add external health worker for monitoring Gitea, Woodpecker, Registry
- Add health check methods to Gitea and Woodpecker clients
- Remove hardcoded fallback projects (pantheon, aeries)
- Add diagnostics domain types and service layer
- Add comprehensive tests for diagnostics handler and service
- Fix tests to use registered test project instead of hardcoded one

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:10:56 -07:00

24 lines
712 B
Go

package domain
import "time"
// ExternalSystem identifies an external dependency.
type ExternalSystem string
const (
ExternalSystemRegistry ExternalSystem = "registry"
ExternalSystemCI ExternalSystem = "ci"
ExternalSystemGit ExternalSystem = "git"
)
// ExternalSystemStatus represents the health of an external system.
type ExternalSystemStatus struct {
System ExternalSystem `json:"system"`
Healthy bool `json:"healthy"`
URL string `json:"url"`
Latency time.Duration `json:"latency"`
Error string `json:"error,omitempty"`
LastChecked time.Time `json:"last_checked"`
LastHealthy time.Time `json:"last_healthy,omitempty"`
}