Documentation ¶
Index ¶
- func New() plugin.Collector
- type HTTPMetricsDownloader
- type MetricsDownloader
- type PrometheusCollector
- func (c PrometheusCollector) Collect(endpoint string) (map[string]*dto.MetricFamily, error)
- func (c *PrometheusCollector) CollectMetrics(mts []plugin.Metric) ([]plugin.Metric, error)
- func (c *PrometheusCollector) GetConfigPolicy() (plugin.ConfigPolicy, error)
- func (c *PrometheusCollector) GetMetricTypes(cfg plugin.Config) ([]plugin.Metric, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPMetricsDownloader ¶
type HTTPMetricsDownloader struct { }
func (HTTPMetricsDownloader) GetEndpoint ¶
func (downloader HTTPMetricsDownloader) GetEndpoint(config plugin.Config) (string, error)
func (HTTPMetricsDownloader) GetMetricsReader ¶
func (downloader HTTPMetricsDownloader) GetMetricsReader(url string) (io.Reader, error)
type MetricsDownloader ¶
type PrometheusCollector ¶
type PrometheusCollector struct {
Downloader MetricsDownloader
}
PrometheusCollector struct
func (PrometheusCollector) Collect ¶
func (c PrometheusCollector) Collect(endpoint string) (map[string]*dto.MetricFamily, error)
func (*PrometheusCollector) CollectMetrics ¶
CollectMetrics will be called by Snap when a task that collects one of the metrics returned from this plugins
func (*PrometheusCollector) GetConfigPolicy ¶
func (c *PrometheusCollector) GetConfigPolicy() (plugin.ConfigPolicy, error)
GetConfigPolicy returns a ConfigPolicyTree for testing
func (*PrometheusCollector) GetMetricTypes ¶
Click to show internal directories.
Click to hide internal directories.