Documentation ¶
Overview ¶
Package statscollector implements plugin that collects the statistics from vpp interfaces and publishes them to prometheus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPlugin = *NewPlugin()
DefaultPlugin is default instance of Plugin.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // RegisterGaugeFunc registers a new gauge with specific name, help string and valueFunc to report status when invoked. RegisterGaugeFunc(name string, help string, valueFunc func() float64) }
API defines API of the stats collector plugin. Currently it only allows registering of a gauge.
type Deps ¶
type Deps struct { infra.PluginDeps ServiceLabel servicelabel.ReaderAPI // Contiv plugin is used to lookup pod related to interfaces statistics Contiv contiv.API // Prometheus plugin used to stream statistics Prometheus prometheusplugin.API }
Deps groups the dependencies of the Plugin.
type Option ¶
type Option func(*Plugin)
Option is a function that acts on a Plugin to inject Dependencies or configuration
type Plugin ¶
Plugin collects the statistics from vpp interfaces and publishes them to prometheus.
func (*Plugin) PrintStats ¶
func (p *Plugin) PrintStats()
PrintStats periodically dumps stats to log
Click to show internal directories.
Click to hide internal directories.