Documentation ¶
Overview ¶
Code generated by "-output dns_configs_map.gen.go -type dnsConfigsMap<string,[]*github.com/networkservicemesh/api/pkg/api/networkservice.DNSConfig> -output dns_configs_map.gen.go -type dnsConfigsMap<string,[]*github.com/networkservicemesh/api/pkg/api/networkservice.DNSConfig>"; DO NOT EDIT.
Package dnscontext provides a DNS specific tools.
Index ¶
Constants ¶
This section is empty.
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 { NameServers []string // contains filtered or unexported fields }
ResolveConfig provides API for editing / reading resolv.conf https://man7.org/linux/man-pages/man5/resolv.conf.5.html
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