Documentation
¶
Index ¶
Constants ¶
View Source
const ( BackendSQLite = "sqlite" BackendPostgreSQL = "postgresql" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertEntry ¶
type AlertEntry struct {
ID string
Timestamp string
AlertRuleName string
AlertRuleCRName string
AlertRuleCRNamespace string
AlertValue string
NamespaceName string
ComponentName string
EnvironmentName string
ProjectName string
ComponentID string
EnvironmentID string
ProjectID string
IncidentEnabled bool
Severity string
Description string
NotificationChannels string // JSON array of channel names
SourceType string
SourceQuery string
SourceMetric string
ConditionOperator string
ConditionThreshold float64
ConditionWindow string
ConditionInterval string
}
AlertEntry represents one fired alert event persisted by the observer.
type AlertEntryStore ¶
type AlertEntryStore interface {
Initialize(ctx context.Context) error
WriteAlertEntry(ctx context.Context, entry *AlertEntry) (id string, err error)
QueryAlertEntries(ctx context.Context, params QueryParams) ([]AlertEntry, int, error)
HasRecentAlert(ctx context.Context, alertRuleCRName, alertRuleCRNamespace, componentUID string, since time.Time) (bool, error)
Close() error
}
AlertEntryStore defines lifecycle and write operations for alert entry persistence.
Click to show internal directories.
Click to hide internal directories.