Documentation ¶
Index ¶
- 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, name string, args ...string) error
- func RunUnderSystemdScope(pid int, slice string, unitName string) error
- func StatusToExitCode(status int) int
- type DetachError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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, 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 StatusToExitCode ¶
StatusToExitCode converts wait status code to an exit code
Types ¶
type DetachError ¶
type DetachError struct{}
DetachError is special error which returned in case of container detach.
func (DetachError) Error ¶
func (DetachError) Error() string
Click to show internal directories.
Click to hide internal directories.