utils

package
v0.0.0-...-e5f8712 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

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

func GetContainerName(arg string) (string, error)

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

func IsContainerDirectory(c *cli.Context) bool

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

func RunCmd(container string, command []string, stdin bool)

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

func RunLinuxCmd(c *cli.Context)

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.

Jump to

Keyboard shortcuts

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