Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TOMLSource ¶
func TOMLSource(dflt, key string) func(*cli.Context) (altsrc.InputSourceContext, error)
Types ¶
type BlockConfig ¶
type BlockConfig struct { IPv4 IP `toml:"ipv4"` IPv6 IP `toml:"ipv6"` TTL Duration `toml:"ttl"` WhiteList StringSlice `toml:"whitelist"` }
func NewBlockConfig ¶
func NewBlockConfig() *BlockConfig
func (*BlockConfig) Flags ¶
func (c *BlockConfig) Flags(prefix string) []cli.Flag
type Config ¶
type DLConfig ¶
type DLConfig struct { UpdateInterval Duration `toml:"update_interval"` Hosts StringSlice `toml:"hosts"` Domains StringSlice `toml:"domains"` DebugHTTP bool `toml:"debug_http"` }
func NewDLConfig ¶
func NewDLConfig() *DLConfig
type DNSCacheConfig ¶
type DNSCacheConfig struct { PruneInterval Duration `toml:"prune_interval"` Disable bool `toml:"disable"` Size int `toml:"size"` }
func NewDNSCacheConfig ¶
func NewDNSCacheConfig() *DNSCacheConfig
func (*DNSCacheConfig) Flags ¶
func (c *DNSCacheConfig) Flags(prefix string) []cli.Flag
type DNSConfig ¶
type DNSConfig struct { Listen StringSlice `toml:"listen"` Block *BlockConfig `toml:"block"` ClientTimeout Duration `toml:"client_timeout"` ServerTimeout Duration `toml:"server_timeout"` DialTimeout Duration `toml:"dial_timeout"` LookupInterval Duration `toml:"lookup_interval"` Cache *DNSCacheConfig `toml:"cache"` Forward StringSlice `toml:"forward"` Zone DNSZones `toml:"zone"` Override StringMapStringSlice `toml:"override"` OverrideTTL Duration `toml:"override_ttl"` HTTP DNSHTTPConfig }
func NewDNSConfig ¶
func NewDNSConfig() *DNSConfig
type DNSHTTPConfig ¶
type DNSHTTPConfig struct { KeepAlive Duration `toml:"keep_alive"` MaxIdleConns int `toml:"max_idle_conns"` MaxIdleConnsPerHost int `toml:"max_idle_conns_per_host"` IdleConnTimeout Duration `toml:"idle_conn_timeout"` TLSHandshakeTimeout Duration `toml:"tls_handshake_timeout"` ExpectContinueTimeout Duration `toml:"expect_continue_timeout"` NoDNSSEC bool `toml:"no_dnssec"` EDNSClientSubnet string `toml:"edns_client_subnet"` NoRandomPadding bool `toml:"no_random_padding"` }
type LogConfig ¶
type LogConfig struct { File string `toml:"file"` Level string `toml:"level"` JSON bool `toml:"json"` }
func NewLogConfig ¶
func NewLogConfig() *LogConfig
type StringMapStringSlice ¶
func (StringMapStringSlice) Generic ¶
func (m StringMapStringSlice) Generic() cli.Generic
func (*StringMapStringSlice) Set ¶
func (m *StringMapStringSlice) Set(value string) error
func (StringMapStringSlice) String ¶
func (m StringMapStringSlice) String() string
type StringSlice ¶
type StringSlice []string
StringSlice is an opaque type for []string to satisfy flag.Value
func (StringSlice) Generic ¶
func (f StringSlice) Generic() cli.Generic
func (*StringSlice) Set ¶
func (f *StringSlice) Set(value string) error
Set the string value to the comma separated list of values
func (*StringSlice) String ¶
func (f *StringSlice) String() string
String returns a readable representation of this value (for usage defaults)
func (*StringSlice) Value ¶
func (f *StringSlice) Value() []string
Value returns the slice of strings set by this flag
Click to show internal directories.
Click to hide internal directories.