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 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 ¶
View Source
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 RunUnderSystemdScope ¶
RunUnderSystemdScope adds the specified pid to a systemd scope
func Tar ¶ added in v1.1.0
func Tar(source string) (io.ReadCloser, error)
Tar creates a tarball from source and returns a readcloser of it
func TarToFilesystem ¶ added in v1.1.0
TarToFilesystem creates a tarball from source and writes to an os.file provided
func UntarToFileSystem ¶ added in v1.1.0
UntarToFileSystem untars an os.file of a tarball to a destination in the filesystem
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.