dns

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 42 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServiceNameToHosts added in v1.1.17

func AddServiceNameToHosts(ctx context.Context, serviceInterface v13.ServiceInterface, hosts ...Entry)

func CancelDNS

func CancelDNS()

func GetDNSIPFromDnsPod added in v1.1.28

func GetDNSIPFromDnsPod(clientset *kubernetes.Clientset) (ips []string, err error)

func GetDNSServiceIPFromPod

func GetDNSServiceIPFromPod(clientset *kubernetes.Clientset, restclient *rest.RESTClient, config *rest.Config, podName, namespace string) (*miekgdns.ClientConfig, error)

func GetHostFile added in v1.1.17

func GetHostFile() string

func NewDNSServer

func NewDNSServer(network, address string, forwardDNS *miekgdns.ClientConfig) error

func SetupDNS

func SetupDNS(clientConfig *miekgdns.ClientConfig, _ []string, useLocalDNS bool) error

systemd-resolve --status, systemd-resolve --flush-caches

func SetupLocalDNS added in v1.1.33

func SetupLocalDNS(clientConfig *miekgdns.ClientConfig, existNameservers []string) error

func WriteResolvConf added in v1.1.21

func WriteResolvConf(config miekgdns.ClientConfig) error

Types

type CoreFile added in v1.1.33

type CoreFile struct {
	Content []byte
}

func BuildCoreFile added in v1.1.33

func BuildCoreFile(corefileTmpl CoreFileTmpl) (*CoreFile, error)

func (*CoreFile) Body added in v1.1.33

func (c *CoreFile) Body() []byte

Gets the Caddyfile contents

func (*CoreFile) Path added in v1.1.33

func (c *CoreFile) Path() string

Gets the path to the origin file

func (*CoreFile) ServerType added in v1.1.33

func (c *CoreFile) ServerType() string

The type of server this input is intended for

type CoreFileTmpl added in v1.1.33

type CoreFileTmpl struct {
	UpstreamDNS string
	Nameservers string
}

type Entry added in v1.1.34

type Entry struct {
	IP     string
	Domain string
}

Jump to

Keyboard shortcuts

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