Help us shape the future of Go! Take the 2026 Go Developer Survey

etchosts

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExtraHosts

func AddExtraHosts(hostsFile string, extraHosts []string) error

AddExtraHosts add hosts, given as name:IP to container /etc/hosts.

func BuildEtcHosts

func BuildEtcHosts(hostsFile string) error

BuildEtcHosts builds NOMAD_TASK_DIR/etc_hosts with defaults.

func CopyEtcHosts

func CopyEtcHosts(hostsFile string) error

CopyEtcHosts copies /etc/hosts to NOMAD_TASK_DIR/etc_hosts

Types

type Record

type Record struct {
	Hosts string
	IP    string
}

Record Structure for a single host record

func (Record) WriteTo

func (r Record) WriteTo(w io.Writer) (int64, error)

WriteTo writes record to file and returns bytes written or error

Jump to

Keyboard shortcuts

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