Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface {
IsEntitySuppressed(ctx context.Context, monitorType string, monitorID string, now time.Time) (matched bool, windowID string, endsAt time.Time, err error)
}
Store is the minimal persistence interface needed by Suppressor. Implemented by *sqlite.MaintenanceStoreImpl.
type Suppressor ¶
type Suppressor struct {
// contains filtered or unexported fields
}
Suppressor implements alert.MaintenanceSuppressor by consulting the maintenance store on every call. There is no in-process cache in v1; the SQL query is O(1) on indexed columns and well within the 5 ms p95 budget (research R7).
func NewSuppressor ¶
func NewSuppressor(store Store, logger *slog.Logger) *Suppressor
NewSuppressor creates a new Suppressor. The clock defaults to time.Now.
func (*Suppressor) IsSuppressed ¶
func (s *Suppressor) IsSuppressed(ctx context.Context, source, entityType, entityID string) (bool, error)
IsSuppressed implements alert.MaintenanceSuppressor. It returns (false, nil) on any error (fail-open per FR-007): a suppressor failure must never block alert creation.
Click to show internal directories.
Click to hide internal directories.