Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActualService ¶
ActualService represents a running service
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector performs continuous drift detection
func NewDetector ¶
func NewDetector(client *ssh.Client, cfg *config.Config, environment string, notifier *notification.Notifier, verbose bool) *Detector
NewDetector creates a new drift detector
func (*Detector) CheckOnce ¶
func (d *Detector) CheckOnce() (*DriftState, error)
CheckOnce performs a single drift detection check
func (*Detector) GetLastState ¶
func (d *Detector) GetLastState() *DriftState
GetLastState returns the last drift state
type DriftReport ¶
type DriftReport struct {
Service string `json:"service"`
Type DriftType `json:"type"`
Expected string `json:"expected"`
Actual string `json:"actual"`
Details map[string]string `json:"details,omitempty"`
DetectedAt time.Time `json:"detected_at"`
Severity string `json:"severity"` // low, medium, high, critical
}
DriftReport represents a drift detection report
type DriftState ¶
type DriftState struct {
Project string `json:"project"`
Environment string `json:"environment"`
LastCheck time.Time `json:"last_check"`
Drifts []DriftReport `json:"drifts"`
ServicesOK []string `json:"services_ok"`
CheckDuration time.Duration `json:"check_duration"`
}
DriftState represents the current drift state
type DriftType ¶
type DriftType string
DriftType represents the type of drift detected
const ( DriftNone DriftType = "none" DriftImageChanged DriftType = "image_changed" DriftReplicasDown DriftType = "replicas_down" DriftServiceGone DriftType = "service_gone" DriftEnvChanged DriftType = "env_changed" DriftConfigChanged DriftType = "config_changed" DriftUnexpected DriftType = "unexpected_service" )
Click to show internal directories.
Click to hide internal directories.