Documentation
¶
Index ¶
- type Store
- func (s *Store) AddComment(incidentID string, comment incident.Comment) error
- func (s *Store) FindActiveByKey(_ context.Context, service, deployID string, since time.Time) (*incident.Incident, error)
- func (s *Store) Get(_ context.Context, id string) (*incident.Incident, error)
- func (s *Store) GetComments(incidentID string) ([]incident.Comment, error)
- func (s *Store) List(_ context.Context, filter incident.IncidentFilter) ([]incident.Incident, error)
- func (s *Store) Save(_ context.Context, inc *incident.Incident) error
- func (s *Store) Update(_ context.Context, inc *incident.Incident) 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 incident.IncidentStore using a mutex-protected slice.
func (*Store) AddComment ¶
AddComment appends a comment to the given incident.
func (*Store) FindActiveByKey ¶
func (s *Store) FindActiveByKey(_ context.Context, service, deployID string, since time.Time) (*incident.Incident, error)
FindActiveByKey returns the most recent active or acknowledged incident matching the given service and optional deploy ID, with LastSeen after since.
func (*Store) GetComments ¶
GetComments returns all comments for the given incident, ordered by creation time.
func (*Store) List ¶
func (s *Store) List(_ context.Context, filter incident.IncidentFilter) ([]incident.Incident, error)
List returns incidents matching the filter, newest first (by FirstSeen).
Click to show internal directories.
Click to hide internal directories.