maintenance

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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