Documentation ¶
Index ¶
- Variables
- func CopyDetachable(dst io.Writer, src io.Reader, keys []byte) (written int64, err error)
- func ExecCmd(name string, args ...string) (string, error)
- func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, ...) error
- func RemoveScientificNotationFromFloat(x float64) (float64, error)
- func RunUnderSystemdScope(pid int, slice string, unitName string) error
- func Tar(source string) (io.ReadCloser, error)
- func TarToFilesystem(source string, tarball *os.File) error
- func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOptions) error
Constants ¶
This section is empty.
Variables ¶
var ErrDetach = errors.New("detached from container")
ErrDetach is an error indicating that the user manually detached from the container.
Functions ¶
func CopyDetachable ¶
CopyDetachable is similar to io.Copy but support a detach key sequence to break out.
func ExecCmd ¶
ExecCmd executes a command with args and returns its output as a string along with an error, if any
func ExecCmdWithStdStreams ¶
func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, args ...string) error
ExecCmdWithStdStreams execute a command with the specified standard streams.
func RemoveScientificNotationFromFloat ¶
RemoveScientificNotationFromFloat returns a float without any scientific notation if the number has any. golang does not handle conversion of float64s that have scientific notation in them and otherwise stinks. please replace this if you have a better implementation.
func RunUnderSystemdScope ¶
RunUnderSystemdScope adds the specified pid to a systemd scope
func Tar ¶
func Tar(source string) (io.ReadCloser, error)
Tar creates a tarball from source and returns a readcloser of it
func TarToFilesystem ¶
TarToFilesystem creates a tarball from source and writes to an os.file provided
func UntarToFileSystem ¶
UntarToFileSystem untars an os.file of a tarball to a destination in the filesystem
Types ¶
This section is empty.