godns

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const EtcdDomainPrefixKey = "domain"
View Source
const EtcdGodnsHostsPrefixKey = "domains"
View Source
const EtcdGodnsServerPrefixKey = "domain_servers"
View Source
const EtcdPrefixKey = "/lain/config"
View Source
const StaticHostsFile = "/etc/hosts"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressItem

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

type Godns

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

func New

func New(dnsAddr string, ip string, kv store.Store, lainlet *lainlet.Client, log *logrus.Logger) *Godns

func (*Godns) AddDomainServer

func (self *Godns) AddDomainServer(domain string, servers []string)

domainServers: [1.1.1.1#53, 2.2.2.2#53]

func (*Godns) AddHost

func (self *Godns) AddHost(addressDomain string, addressIps []string, addressType string)

func (*Godns) DumpConfig

func (self *Godns) DumpConfig() string

func (*Godns) Run

func (self *Godns) Run()

func (*Godns) SaveAddresses

func (self *Godns) SaveAddresses()

func (*Godns) SaveDomainServers

func (self *Godns) SaveDomainServers()

func (*Godns) SaveHosts

func (self *Godns) SaveHosts()

func (*Godns) Stop

func (self *Godns) Stop()

func (*Godns) UpdateStaticHosts

func (self *Godns) UpdateStaticHosts()

func (*Godns) UpdateWebrouterVips

func (self *Godns) UpdateWebrouterVips(webrouterVips []string)

func (*Godns) WatchDomainServer

func (self *Godns) WatchDomainServer(watchCh <-chan struct{})

func (*Godns) WatchGodnsDomains

func (self *Godns) WatchGodnsDomains(watchCh <-chan struct{})

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 ServerItem

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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