Documentation
¶
Overview ¶
Package alerts provides alerts based on history of events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alerter ¶
type Alerter struct {
sync.Mutex
History *History
Events []*Event
// contains filtered or unexported fields
}
Alerter is based on number of recent requests.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is message with a time stamp
type History ¶
History stores a list of recent requests.
func NewHistory ¶
NewHistory creates a new instance of History. A clock is passed in to facilate testing.
func (*History) RecentRequestCount ¶
RecentRequestCount returns number of requests since last watch interval.
Click to show internal directories.
Click to hide internal directories.