dnscontext

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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

func (*Decoder) Decode

func (d *Decoder) Decode(v string) error

Decode parses values from passed string.

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/

func (*Manager) Remove

func (m *Manager) Remove(id string)

Remove removes dns config by id

func (*Manager) Store

func (m *Manager) Store(id string, configs ...*networkservice.DNSConfig)

Store stores new config with specific id

func (*Manager) String

func (m *Manager) String() string

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) Save

func (r *ResolveConfig) Save() error

Save saves resolve config file

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

Jump to

Keyboard shortcuts

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