dnsmon

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package dnsmon contains the DNS monitor.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ETCResolvConf is the default resolv.conf in /etc.
	ETCResolvConf = "/etc/resolv.conf"

	// StubResolvConf is the stub resolv.conf of systemd-resolved.
	StubResolvConf = "/run/systemd/resolve/stub-resolv.conf"

	// SystemdResolvConf is the systemd resolv.conf.
	SystemdResolvConf = "/run/systemd/resolve/resolv.conf"
)

Functions

This section is empty.

Types

type Config added in v0.1.0

type Config struct {
	ETCResolvConf     string
	StubResolvConf    string
	SystemdResolvConf string
}

Config is a DNSMon configuration.

func NewConfig added in v0.1.0

func NewConfig() *Config

NewConfig returns a new DNSMon config.

type DNSMon

type DNSMon struct {
	// contains filtered or unexported fields
}

DNSMon is a DNS monitor.

func NewDNSMon

func NewDNSMon(config *Config) *DNSMon

NewDNSMon returns a new DNSMon.

func (*DNSMon) Start

func (d *DNSMon) Start() error

Start starts the DNSMon.

func (*DNSMon) Stop

func (d *DNSMon) Stop()

Stop stops the DNSMon.

func (*DNSMon) Updates

func (d *DNSMon) Updates() chan struct{}

Updates returns the channel for dns config updates.

Jump to

Keyboard shortcuts

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