package network
import "github.com/Microsoft/opengcs/internal/network"
Index ¶
- func GenerateEtcHostsContent(ctx context.Context, hostname string) string
- func GenerateResolvConfContent(ctx context.Context, searches, servers, options []string) (_ string, err error)
- func InstanceIDToName(ctx context.Context, id string) (_ string, err error)
- func MergeValues(first, second []string) []string
Functions ¶
func GenerateEtcHostsContent ¶
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 ¶
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 ¶
MergeValues merges `first` and `second` maintaining order `first, second`.
Source Files ¶
- Version
- v0.4.0 (latest)
- Published
- Dec 4, 2020
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 3 weeks ago –
Tools for package owners.