Documentation ¶
Overview ¶
Package utils provides functions that all operations can use to kick off the execution of their commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContainerName ¶
GetContainerName takes the string the user provided on the command line and extracts the container name. Some example inputs: '/containers/awesome_cray' or 'awesome_cray/var/lib'
func IsContainerDirectory ¶
IsContainerDirectory checks to see if the current directory is the /containers directory. If it is, then all of terminal commands should turn into terminal commands.
func RunCmd ¶
RunCmd takes the name of a container, and a command to run (a list of arguments). It sets up a 'docker exec'-type command and executes it.
func RunLinuxCmd ¶
RunLinuxCmd just does a normal linux command. This is used if we can't run a certain command, or if a command was run out of the context of the /containers directory.
Types ¶
This section is empty.