Documentation
¶
Overview ¶
Package dnscontext provides a DNS specific tools.
Index ¶
Constants ¶
View Source
const ( // SearchProperty means search list for host-name lookup SearchProperty = "search" // NameserverProperty means name server IP address NameserverProperty = "nameserver" // OptionsProperty allows certain internal resolver variables to be modified OptionsProperty = "options" // AnyDomain means that allowed any host-name AnyDomain = "." )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder []*networkservice.DNSConfig
Decoder allows to parse []*networkservice.DNSConfig from json string. Can be used for env configuration. See at https://github.com/kelseyhightower/envconfig#custom-decoders
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager can store, remove []dnscontext.Config and also present it as corefile. See what is corefile here: https://coredns.io/2017/07/23/corefile-explained/
type ResolveConfig ¶
type ResolveConfig struct {
// contains filtered or unexported fields
}
ResolveConfig provides API for editing / reading resolv.conf
func OpenResolveConfig ¶
func OpenResolveConfig(p string) (*ResolveConfig, error)
OpenResolveConfig reads resolve config file from specific path
func (*ResolveConfig) SetValue ¶
func (r *ResolveConfig) SetValue(k string, values ...string)
SetValue sets value for specific property
func (*ResolveConfig) Value ¶
func (r *ResolveConfig) Value(k string) []string
Value returns value of property
Click to show internal directories.
Click to hide internal directories.