Documentation
¶
Index ¶
- Constants
- Variables
- func AttachAndExec(containerID string, bashcmd []string) error
- func AttachAndRun(containerID string, bashcmd []string) ([]byte, error)
- func BackupDir(basepath string) string
- func ConvertUp(oldNumber string, baseAlphabet string) string
- func DockerIsLoggedIn() bool
- func DockerLogin(username, password, email string) (string, error)
- func ExecDockerExec(containerID string, bashcmd []string) error
- func GetExitStatus(err error) (int, bool)
- func GetIPAddress() (ip string, err error)
- func GetIPv4Addresses() (ips []string, err error)
- func GetMemorySize() (size uint64, err error)
- func HostID() (hostid string, err error)
- func Isatty(f *os.File) bool
- func LocalDir(p string) string
- func NewUUID() (string, error)
- func NewUUID36() (string, error)
- func NewUUID62() (string, error)
- func ResourcesDir() string
- func RunDockerExec(containerID string, bashcmd []string) ([]byte, error)
- func ServiceDHome() string
- func ServicedLogDir() string
- func SetSysctl(key string, value string) ([]byte, error)
- func ShellQuoteArg(arg string) string
- func ShellQuoteArgs(args []string) string
- func StringInSlice(a string, list []string) bool
- func StringSliceEquals(lhs []string, rhs []string) bool
- func TempDir(p string) string
- type EngNotation
- type RouteEntry
Constants ¶
const ( Rhel = iota Debian )
Variables ¶
var Platform = determinePlatform()
Functions ¶
func AttachAndExec ¶
AttachAndExec attaches to a container and execs the command
func AttachAndRun ¶
AttachAndRun attaches to a container and runs the command
func DockerIsLoggedIn ¶
func DockerIsLoggedIn() bool
func DockerLogin ¶
func ExecDockerExec ¶
ExecDockerExec execs the command using docker exec
func GetExitStatus ¶
GetExitStatus tries to extract the exit code from an error
func GetIPAddress ¶
GetIPAddress attempts to find the IP address to the default outbout interface.
func GetIPv4Addresses ¶
GetIPAddresses returns a list of all IPv4 interface addresses
func GetMemorySize ¶
GetMemorySize attempts to get the size of the installed RAM.
func LocalDir ¶
LocalDir gets the absolute path to a particular directory under ServiceDHome if SERVICED_HOME is not defined then we use the location of the caller
func ResourcesDir ¶
func ResourcesDir() string
ResourcesDir points to internal services resources directory
func RunDockerExec ¶
RunDockerExec runs the command using docker exec
func ServiceDHome ¶
func ServiceDHome() string
ServiceDHome gets the home location of serviced by looking at the enviornment
func ShellQuoteArgs ¶
Quote a list of arguments and join them with spaces
func StringInSlice ¶
StringInSlice test if a string exists in a slice
func StringSliceEquals ¶
StringSliceEquals compare two string slices for equality
Types ¶
type EngNotation ¶
type EngNotation struct { Value uint64 // contains filtered or unexported fields }
Structure used for serializing/deserializing values represented as strings in engineering notation (e.g., 1K, 256M, etc.)
func (EngNotation) MarshalJSON ¶
func (i EngNotation) MarshalJSON() (text []byte, err error)
func (*EngNotation) UnmarshalJSON ¶
func (e *EngNotation) UnmarshalJSON(b []byte) (err error)
type RouteEntry ¶
type RouteEntry struct { Destination string Gateway string Genmask string Flags string Metric int Ref int Use int Iface string }
RouteEntry represents a entry from the route command
func RouteCmd ¶
func RouteCmd() (routes []RouteEntry, err error)
RouteCmd wrapper around the route command