package
Version:
v0.0.0-...-c71c7b6
Opens a new window with list of versions in this module.
Published: Jun 28, 2017
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
An Alert notifies the listener of high traffic, and also when traffic
returns to a normal level
ByHits implements sort.Interface for []SizeHite, based on the number of hits
type Collator struct {
ErrorChan chan error
SitesChan chan *Sites
StatusChan chan *Status
AlertChan chan *Alert
ResetChan chan bool
}
Create a new Collator and start running its goroutines. The caller can
stop the Collator by calling the CancelFunc in the passed-in context.
type Site struct {
TotalHits int
Site string
}
type Sites struct {
Sites []Site
}
The Sites object lists the # of hits per site, and are sent less often
(every 10 seconds)
type Status struct {
HitsLastSecond int
AverageHitsPerSecond float64
}
These Status objects are sent frequently (one per second)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.