util

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error, msg string, level string)

CheckErr checks for error, logs and optionally exits the program

Example (Exit)
// fakeErr := errors.New("Fake error")
// How do we test the output and the os.Exit(1)?"
// CheckErr(fakeErr, "test: %v", "fatal")
Output:

Example (Nil)
CheckErr(nil, "test", "fatal")
Output:

Example (NoExit)
fakeErr := errors.New("Fake error")
CheckErr(fakeErr, "test: %v", "error")
Output:

func GetVolumeLabel

func GetVolumeLabel(vol *types.Volume, key string) (value string, err error)

GetVolumeLabel retrieves the value of given key in the io.conplicity namespace of the volume labels

func PullImage

func PullImage(c *docker.Client, image string) (err error)

PullImage pulls an image from the registry

func RemoveContainer

func RemoveContainer(c *docker.Client, id string)

RemoveContainer removes a container

Types

This section is empty.

Jump to

Keyboard shortcuts

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