Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllMetrics = []MetricName{ CacheHits, CacheMisses, CacheEvictions, CacheInsertions, CacheSize, }
AllMetrics is a list of all exported metrics.
Functions ¶
func ExtractDnsmasqArgs ¶
ExtractDnsmasqArgs returns the arguments that appear after "--" in the the command line. This function will also remove "--" and subsequent arguments from cmdlineArgs.
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 ¶
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.
type Nanny ¶
Nanny encapsulates a dnsmasq process and manages its configuration.
type RunNannyOpts ¶
type RunNannyOpts struct { // Location of the dnsmasq executable. DnsmasqExec string // Extra arguments to dnsmasq. DnsmasqArgs []string // Restart the daemon on ConfigMap changes. RestartOnChange bool }
RunNannyOpts for running the nanny.
Click to show internal directories.
Click to hide internal directories.