Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { // Forward makes the collector start collecting Harvests. When the Collector receives a Harvest, // it forwards it from the channel passed as argument Forward(chan<- Harvest) }
Collector implementors harvest metrics from a given source and forward them by the channel specified in the Forward function
func NewHTTPCollector ¶
func NewHTTPCollector(server transport.HTTPServer) Collector
NewHTTPCollector attaches an httpCollector to the "/http" path of the passed server, and returns it.
func StaticCollector ¶
StaticCollector creates a staticCollector from a set of harvesters that are statically available at compile time
type Harvest ¶
type Harvest map[string]interface{}
Harvest represents a key-value map of a collected set of metrics. To ve valid, it must have an "eventType" field.
type Harvester ¶
type Harvester interface { // Start makes the harvester collecting new metrics. Each individual harvested metric will be // submitted through the channel that is passed by argument. Start(chan<- Harvest) }
Harvester defines the interface for any item that collects (harvests) metrics, and submits them through the channel passed in the Start function
func SystemHarvester ¶
SystemHarvester returns a harvester that collects system-level metrics (cpu, memory consumption...) with the interval passed as parameter