Documentation ¶
Index ¶
- Constants
- type Silence
- type Store
- func (s *Store) AddNote(encodedKey string, note note.Note) (*Silence, error)
- func (s *Store) Archive(encodedKey string) (*Silence, error)
- func (s *Store) Delete(encodedKey string) error
- func (s *Store) DeleteNote(encodedKey string, index int) (*Silence, error)
- func (s *Store) GetAll() ([]Silence, error)
- func (s *Store) GetRecentlyArchived(updatedWithin time.Duration) ([]Silence, error)
- func (s *Store) Put(silence *Silence) (*Silence, error)
- func (s *Store) Reactivate(encodedKey, duration, user string) (*Silence, error)
Constants ¶
View Source
const ( SILENCE_PARENT_KEY = "-silence-" NUM_RECENTLY_ARCHIVED = 500 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Silence ¶
type Silence struct { Key string `json:"key" datastore:"-"` Active bool `json:"active" datastore:"active"` User string `json:"user" datastore:"user"` ParamSet paramtools.ParamSet `json:"param_set" datastore:"-"` ParamSetSerial string `json:"-" datastore:"param_set_serial,noindex"` Created int64 `json:"created" datastore:"created"` Updated int64 `json:"updated" datastore:"updated"` Duration string `json:"duration" datastore:"duration"` Notes []note.Note `json:"notes" datastore:"notes,flatten"` }
Silence is a filter that matches Incidents and is used to silence them.
func (*Silence) ValidateRegexes ¶
ValidateRegexes returns an error if the silence is not valid.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store saves and updates silences in Cloud Datastore.
func (*Store) DeleteNote ¶
func (*Store) GetRecentlyArchived ¶
GetRecentlyArchived returns N most recently archived Silences that were updated within the specified duration. updatedWithin can be 0 if we want all recently archived silences.
Click to show internal directories.
Click to hide internal directories.