v1.0.3 Latest Latest

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

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 2 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type CollectContext

type CollectContext struct {
	Connection  *connector.SSHConnection
	LabelValues []string
	Metrics     chan<- prometheus.Metric
	Errors      chan error
	Done        chan struct{}

CollectContext provides context passed as an argument to the specific collectors.

type Collector

type Collector interface {
	// Name returns the name of this collector.
	// This name is used in the configuration file to refer to collectors
	Name() string
	// Describe sends the super-set of all possible descriptors of metrics
	// collected by this Collector to the provided channel and returns once
	// the last descriptor has been sent.
	Describe(ch chan<- *prometheus.Desc)
	// Collect is called by the cisco_collector. The implementation sends
	// errors and metrics to the corresponding channels in the CollectContext.
	// The collector signals being done by writing an empty struct to the Done channel.
	Collect(ctx *CollectContext)

Collector is an interface that each of the specific collector must implement.

Jump to

Keyboard shortcuts

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