dnsmasq

package
v0.0.0-...-7b0ec94 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllMetrics is a list of all exported metrics.

Functions

This section is empty.

Types

type MetricName

type MetricName string

MetricName is a metric

const (
	// CacheHits from dnsmasq.
	CacheHits MetricName = "hits"
	// CacheMisses from dnsmasq
	CacheMisses MetricName = "misses"
	// CacheEvictions from dnsmasq
	CacheEvictions MetricName = "evictions"
	// CacheInsertions from dnsmasq
	CacheInsertions MetricName = "insertions"
	// CacheSize from dnsmasq
	CacheSize MetricName = "cachesize"
)

type Metrics

type Metrics map[MetricName]int64

Metrics exported by dnsmasq via *.bind CHAOS queries.

type MetricsClient

type MetricsClient interface {
	GetMetrics() (ret *Metrics, err error)
}

MetricsClient is a client used to obtain metrics from dnsmasq.

func NewMetricsClient

func NewMetricsClient(addr string, port int) MetricsClient

NewMetricsClient creates a new client for getting raw metrics from dnsmasq via the *.bind CHAOS TXT records. Note: this feature works for dnsmasq v2.76+, it is missing in older releases of the software.

Jump to

Keyboard shortcuts

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