dnsmasq

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DnsmaqdPidfile = "/var/run/dnsmasq.pid"
View Source
const EtcdAddressPrefixKey = "dnsmasq_addresses"
View Source
const EtcdDnsExtraPrefixKey = "extra_domains"
View Source
const EtcdPrefixKey = "/lain/config"
View Source
const EtcdServerPrefixKey = "dnsmasq_servers"
View Source
const EtcdVipPrefixKey = "vip"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressItem

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

type JSONAddressConfig

type JSONAddressConfig struct {
	Ips  []string `json:"ips"`
	Type string   `json:"type"`
}

type JSONServerConfig

type JSONServerConfig struct {
	Servers []string `json:"servers"` // ip#port
}

type Server

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

func New

func New(ip string, kv store.Store, lainlet *lainlet.Client, log *logrus.Logger,
	host string, server string, domain string, extra bool) *Server

func (*Server) AddAddress

func (self *Server) AddAddress(addressDomain string, addressIps []string, addressType string)

func (*Server) AddServer

func (self *Server) AddServer(domain string, servers []string)

servers: [1.1.1.1#53, 2.2.2.2#53]

func (*Server) FetchVip

func (self *Server) FetchVip() string

func (*Server) ReloadDnsmasq

func (self *Server) ReloadDnsmasq()

reconfig dnsmasq

func (*Server) RestartDnsmasq

func (self *Server) RestartDnsmasq()

func (*Server) RunDnsmasqd

func (self *Server) RunDnsmasqd()

func (*Server) SaveAddresses

func (self *Server) SaveAddresses()

func (*Server) SaveExtras

func (self *Server) SaveExtras()

func (*Server) SaveServers

func (self *Server) SaveServers()

func (*Server) StopDnsmasqd

func (self *Server) StopDnsmasqd()

func (*Server) WatchDnsmasqAddress

func (self *Server) WatchDnsmasqAddress(watchCh <-chan struct{})

func (*Server) WatchDnsmasqExtra

func (self *Server) WatchDnsmasqExtra(watchCh <-chan struct{})

func (*Server) WatchDnsmasqServer

func (self *Server) WatchDnsmasqServer(watchCh <-chan struct{})

func (*Server) WatchVip

func (self *Server) WatchVip(watchCh <-chan struct{})

type ServerItem

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

Jump to

Keyboard shortcuts

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