internal

package
v0.0.0-...-f4dd720 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFilePath

func CheckFilePath(path string) (string, error)

CheckFilePath verifies and fixes a file path

func DefaultNamespace

func DefaultNamespace() (string, error)

DefaultNamespace returns the default namespace for a user, which generally is the user's username.

func FindAvailablePort

func FindAvailablePort() int

FindAvailablePort helps to find a tcp port

func GenerateContainerName

func GenerateContainerName(namespace, vmname string) string

GenerateContainerName generates a container name based on the namespace and virtual machine name.

func GetDefaultWorkDir

func GetDefaultWorkDir() string

GetDefaultWorkDir returns the default working directory

func GetUserHomePath

func GetUserHomePath() string

GetUserHomePath gets the users Home Path

func ParseContainerName

func ParseContainerName(contname string) (ns, vmname string, err error)

ParseContainerName takes a container name and returns the VM namespace and name, or an error if the container name is incorrectly formatted.

func RandomName

func RandomName() string

RandomName returns a randomly generated name. This just wraps docker's namesgenerator.GetRandomName() to avoid extra imports.

Types

This section is empty.

Jump to

Keyboard shortcuts

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