collector

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2015 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// Collect metrics from this collector.
	// Returns the next time this collector should be collected from.
	// Next collection time is always returned, even when an error occurs.
	// A collection time of zero means no more collection.
	Collect() (time.Time, []v2.Metric, error)

	// Name of this collector.
	Name() string
}

Metric collector.

type CollectorManager

type CollectorManager interface {
	// Register a collector.
	RegisterCollector(collector Collector) error

	// Collect from collectors that are ready and return the next time
	// at which a collector will be ready to collect from.
	// Next collection time is always returned, even when an error occurs.
	// A collection time of zero means no more collection.
	Collect() (time.Time, []v2.Metric, error)
}

Manages and runs collectors.

func NewCollectorManager

func NewCollectorManager() (CollectorManager, error)

Returns a new CollectorManager that is thread-compatible.

type FakeCollectorManager

type FakeCollectorManager struct {
}

func (*FakeCollectorManager) Collect

func (fkm *FakeCollectorManager) Collect() (time.Time, []v2.Metric, error)

func (*FakeCollectorManager) RegisterCollector

func (fkm *FakeCollectorManager) RegisterCollector(collector Collector) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL