utils

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDetachable

func CopyDetachable(dst io.Writer, src io.Reader, keys []byte) (written int64, err error)

CopyDetachable is similar to io.Copy but support a detach key sequence to break out.

func ExecCmd

func ExecCmd(name string, args ...string) (string, error)

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

func RunUnderSystemdScope(pid int, slice string, unitName string) error

RunUnderSystemdScope adds the specified pid to a systemd scope

func StatusToExitCode

func StatusToExitCode(status int) int

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

Jump to

Keyboard shortcuts

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