domain

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlertNotFound = fmt.Errorf("alert not found")

ErrAlertNotFound is returned when an alert cannot be found.

View Source
var ErrAlertRuleNotFound = fmt.Errorf("alert rule not found")

ErrAlertRuleNotFound is returned when an alert rule cannot be found.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ID         string        `json:"id"`
	RuleID     string        `json:"rule_id"`
	Severity   AlertSeverity `json:"severity"`
	Message    string        `json:"message"`
	FiredAt    time.Time     `json:"fired_at"`
	ResolvedAt *time.Time    `json:"resolved_at,omitempty"`
}

Alert represents a fired alert instance.

type AlertChannel

type AlertChannel string

AlertChannel represents the notification channel for an alert.

const (
	AlertChannelSlack AlertChannel = "slack"
	AlertChannelEmail AlertChannel = "email"
)

type AlertRule

type AlertRule struct {
	ID                string       `json:"id"`
	Name              string       `json:"name"`
	MetricName        string       `json:"metric_name"`
	Condition         string       `json:"condition,omitempty"`
	WarningThreshold  float64      `json:"warning_threshold"`
	CriticalThreshold float64      `json:"critical_threshold"`
	Threshold         float64      `json:"threshold,omitempty"`
	Channel           AlertChannel `json:"channel"`
	Enabled           bool         `json:"enabled"`
}

AlertRule defines a condition that triggers an alert when met.

type AlertSeverity

type AlertSeverity string

AlertSeverity represents the severity level of a fired alert.

const (
	AlertSeverityCritical AlertSeverity = "critical"
	AlertSeverityWarning  AlertSeverity = "warning"
	AlertSeverityInfo     AlertSeverity = "info"
)

type ClusterMetrics

type ClusterMetrics struct {
	CPUUsage     float64 `json:"cpu_usage"`     // percentage 0-100
	MemoryUsage  float64 `json:"memory_usage"`  // percentage 0-100
	StorageUsage float64 `json:"storage_usage"` // percentage 0-100
	PodCount     int     `json:"pod_count"`
}

ClusterMetrics holds resource utilization metrics for a cluster.

type Dashboard

type Dashboard struct {
	ClusterMetrics  ClusterMetrics  `json:"cluster_metrics"`
	PipelineMetrics PipelineMetrics `json:"pipeline_metrics"`
	ToolHealthList  []ToolHealth    `json:"tool_health"`
}

Dashboard aggregates all observability data for the platform overview.

type PipelineMetrics

type PipelineMetrics struct {
	TotalRuns    int     `json:"total_runs"`
	SuccessRate  float64 `json:"success_rate"` // percentage 0-100
	AvgBuildTime float64 `json:"avg_build_time_seconds"`
}

PipelineMetrics holds CI/CD pipeline execution statistics.

type ToolHealth

type ToolHealth struct {
	Name    string `json:"name"`
	Status  string `json:"status"` // running, warning, error
	Version string `json:"version"`
}

ToolHealth represents the health status of a DevOps tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL