Documentation
¶
Overview ¶
Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf. Originally from github.com/docker/libnetwork/resolvconf but heavily modified to better work with podman.
Index ¶
Constants ¶
View Source
const (
// DefaultResolvConf points to the default file used for dns configuration on a linux machine.
DefaultResolvConf = "/etc/resolv.conf"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Params ¶
type Params struct {
// Path is the path to new resolv.conf file which should be created.
Path string
// Namespaces is the list of container namespaces.
// This is required to fist check for a resolv.conf under /etc/netns,
// created by "ip netns". Also used to check if the container has a
// netns in which case localhost nameserver must be filtered.
Namespaces []specs.LinuxNamespace
// IPv6Enabled will filter ipv6 nameservers when not set to true.
IPv6Enabled bool
// KeepHostServers can be set when it is required to still keep the
// original resolv.conf nameservers even when explicit Nameservers
// are set. In this case they will be appended to the given values.
KeepHostServers bool
// KeepHostSearches can be set when it is required to still keep the
// original resolv.conf search domains even when explicit search domains
// are set in Searches.
KeepHostSearches bool
// KeepHostOptions can be set when it is required to still keep the
// original resolv.conf options even when explicit options are set in
// Options.
KeepHostOptions bool
// Nameservers is a list of nameservers the container should use,
// instead of the default ones from the host. Set KeepHostServers
// in order to also keep the hosts resolv.conf nameservers.
Nameservers []string
// Searches is a list of dns search domains the container should use,
// instead of the default ones from the host. Set KeepHostSearches
// in order to also keep the hosts resolv.conf search domains.
Searches []string
// Options is a list of dns options the container should use,
// instead of the default ones from the host. Set KeepHostOptions
// in order to also keep the hosts resolv.conf options.
Options []string
// contains filtered or unexported fields
}
Params for the New() function.
Click to show internal directories.
Click to hide internal directories.