Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolv ¶
type Resolv struct { Data string `yaml:"contents"` Enabled bool `yaml:"enable"` File string `yaml:"file"` Folder string `yaml:"folder"` Name string `yaml:"name"` }
Resolv is a struct of properties which are translates to a local resolv for dnsmasq to redirect a given domain suffix to the local docker daemon. Windows has a custom solution, however this will be used on both Mac and Linux.
func (Resolv) Clean ¶
func (resolv Resolv) Clean()
Clean will cleanup the resolv file configured to the system and run some cleanup commands which were ran at the end of resolv.Configure on MacOS.
func (Resolv) Configure ¶
Configure will ensure the given Resolv type a method that can setup a file with the contents of Data at File in Folder. This file will route traffic on a configured namespace to the localhost and dnsmasq will accept this traffic and route it to the docker container. It will remove the file and/or rewrite the contents for both MacOS and Linux - Linux will however result in removing the string from the file, where MacOS will contain a file with only the contents of Data. MacOS will also run the following upon completion of this function: * sudo ifconfig lo0 alias 172.16.172.16 * sudo killall mDNSResponder