Documentation
¶
Index ¶
- type Store
- func (s *Store) Delete(_ context.Context, id string) error
- func (s *Store) Get(_ context.Context, id string) (*monitor.Monitor, error)
- func (s *Store) GetAlert(_ context.Context, id string) (*monitor.AlertEvent, error)
- func (s *Store) List(_ context.Context, filter monitor.MonitorFilter) ([]monitor.Monitor, error)
- func (s *Store) ListAlerts(_ context.Context, filter monitor.AlertFilter) ([]monitor.AlertEvent, error)
- func (s *Store) ListEnabled(_ context.Context) ([]monitor.Monitor, error)
- func (s *Store) Save(_ context.Context, m *monitor.Monitor) error
- func (s *Store) SaveAlert(_ context.Context, a *monitor.AlertEvent) error
- func (s *Store) Update(_ context.Context, m *monitor.Monitor) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements both monitor.MonitorStore and monitor.AlertStore using mutex-protected slices.
func (*Store) ListAlerts ¶
func (s *Store) ListAlerts(_ context.Context, filter monitor.AlertFilter) ([]monitor.AlertEvent, error)
ListAlerts returns alert events matching the filter, newest first.
func (*Store) ListEnabled ¶
ListEnabled returns all monitors with Enabled == true.
Click to show internal directories.
Click to hide internal directories.