collectors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStd

func ParseStd(content []byte) (map[labelValue]count, error)

Types

type Collector

type Collector struct {
	Data map[labelValue]count // last fetched data
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(client *nextdns.Client, profileId string, cd *CollectorDefine) *Collector

func NewDnssec

func NewDnssec(client *nextdns.Client, profileId string) *Collector

func NewProtocols

func NewProtocols(client *nextdns.Client, profileId string) *Collector

func NewStatus

func NewStatus(client *nextdns.Client, profileId string) *Collector

func (Collector) Collect

func (c Collector) Collect(ch chan<- prometheus.Metric)

func (Collector) Describe

func (c Collector) Describe(ch chan<- *prometheus.Desc)

type CollectorDefine

type CollectorDefine struct {
	Name, Label string // Name of the metric (prefixed and suffixed), discriminig label of the metric
	Endpoint    string // endpoint to fetch data from, without the profile part, starting after the /
	Parse       ParseFunc
}

type ParseFunc

type ParseFunc func([]byte) (map[labelValue]count, error)

Jump to

Keyboard shortcuts

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