darwin

package
v0.0.0-...-f23e423 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddResolver

func AddResolver(dns string, name []string) error

func DelResolver

func DelResolver(dns string) error

Types

type DNSConfig

type DNSConfig struct {
	Domain       string
	SearchDomain []string
	NameServers  []string
	IfIndex      string
	IfName       string
	Flags        string
	Reach        string
	Options      string
}

DNSConfig structure

type Interface

type Interface interface {
	// GetDNSServers retreive the dns servers
	GetDNSServers(iface string) error
	// Set DNS server
	SetDNSServer(dns string, domains []string, peers []string, internal string, api string) error
	// Reset DNS server
	ResetDNSServer(dns string) error
	AddInterfaceAlias(string) error
	RemoveInterfaceAlias(string) error
	ReturnDNS() []string
	ReturnDomainSearch() []string
}

Interface is an injectable interface for running scutil/networkconfig/ifconfig commands.

func New

func New(exec utilexec.Interface) Interface

New returns a new Interface which will exec scutil.

Jump to

Keyboard shortcuts

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