network

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateEtcHostsContent

func GenerateEtcHostsContent(ctx context.Context, hostname string) string

GenerateEtcHostsContent generates a /etc/hosts file based on `hostname`.

func GenerateResolvConfContent

func GenerateResolvConfContent(ctx context.Context, searches, servers, options []string) (_ string, err error)

GenerateResolvConfContent generates the resolv.conf file content based on `searches`, `servers`, and `options`.

func InstanceIDToName

func InstanceIDToName(ctx context.Context, id string) (_ string, err error)

InstanceIDToName converts from the given instance ID (a GUID generated on the Windows host) to its corresponding interface name (e.g. "eth0").

Will retry the operation until `ctx` is exceeded or canceled.

func MergeValues

func MergeValues(first, second []string) []string

MergeValues merges `first` and `second` maintaining order `first, second`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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