Documentation ¶
Index ¶
- type AutoClose
- type CreatedMetaData
- type Entry
- type EscalationMetaData
- type NotificationMetaData
- type SearchCursor
- type SearchOptions
- type Store
- func (s *Store) FindLatestByType(ctx context.Context, alertID int, status Type) (*Entry, error)
- func (s *Store) FindOne(ctx context.Context, logID int) (*Entry, error)
- func (s *Store) LogEPTx(ctx context.Context, tx *sql.Tx, epID string, _type Type, ...) error
- func (s *Store) LogManyTx(ctx context.Context, tx *sql.Tx, alertIDs []int, _type Type, meta interface{}) error
- func (s *Store) LogServiceTx(ctx context.Context, tx *sql.Tx, serviceID string, _type Type, ...) error
- func (s *Store) LogTx(ctx context.Context, tx *sql.Tx, alertID int, _type Type, meta interface{}) error
- func (s *Store) MustLog(ctx context.Context, alertID int, _type Type, meta interface{})
- func (s *Store) MustLogTx(ctx context.Context, tx *sql.Tx, alertID int, _type Type, meta interface{})
- func (s *Store) Search(ctx context.Context, opts *SearchOptions) ([]Entry, error)
- type Subject
- type SubjectType
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatedMetaData ¶
type CreatedMetaData struct {
EPNoSteps bool
}
type EscalationMetaData ¶
type NotificationMetaData ¶
type NotificationMetaData struct {
MessageID string
}
type SearchCursor ¶
type SearchCursor struct {
ID int `json:"i,omitempty"`
}
type SearchOptions ¶
type SearchOptions struct { // FilterAlertIDs restricts the log entries belonging to specific alertIDs only. FilterAlertIDs []int `json:"f"` // Limit restricts the maximum number of rows returned. Default is 15. Limit int `json:"-"` After SearchCursor `json:"a,omitempty"` }
SearchOptions contains criteria for filtering alert logs.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) FindLatestByType ¶
FindLatestByType returns the latest Log Entry given alertID and status type
func (*Store) LogServiceTx ¶
type Subject ¶
type Subject struct { ID string `json:"id"` Name string `json:"name"` Type SubjectType `json:"type"` Classifier string `json:"classifier"` }
A Subject is generally the causer of an event. If a user closes an alert, the entry would have a Subject set to the user.
type SubjectType ¶
type SubjectType string
SubjectType represents the type of subject or causer of an alert event.
const ( SubjectTypeUser SubjectType = "user" SubjectTypeIntegrationKey SubjectType = "integration_key" SubjectTypeHeartbeatMonitor SubjectType = "heartbeat_monitor" SubjectTypeChannel SubjectType = "channel" SubjectTypeNone SubjectType = "" )
Possible subject types
func (*SubjectType) Scan ¶
func (s *SubjectType) Scan(value interface{}) error
Scan handles reading a Type from the DB enum
type Type ¶
type Type string
A Type represents a log entry type for an alert.
const ( TypeCreated Type = "created" TypeClosed Type = "closed" TypeNotificationSent Type = "notification_sent" TypeNoNotificationSent Type = "no_notification_sent" TypeEscalated Type = "escalated" TypeAcknowledged Type = "acknowledged" TypePolicyUpdated Type = "policy_updated" TypeDuplicateSupressed Type = "duplicate_suppressed" TypeEscalationRequest Type = "escalation_request" )
Types of Log Entries
Click to show internal directories.
Click to hide internal directories.