runner

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Overview

package runner provides a simple interface for running docker containers.

Index

Constants

View Source
const DefaultStopTimeout = 10

DefaultStopTimeout is the number of seconds to wait when stopping a container.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunOpts

type RunOpts struct {
	// Image is the image to run.
	Image image.Image

	// Command is the command to run.
	Command string

	// Environment variables to set.
	Env map[string]string

	// Streams fo Stdout, Stderr and Stdin.
	Input  io.Reader
	Output io.Writer
}

RunOpts is used when running.

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner is a service for running containers.

func NewRunner

func NewRunner(client *dockerutil.Client) *Runner

NewRunner returns a new Runner instance using the docker.Client as the docker client.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, opts RunOpts) error

Jump to

Keyboard shortcuts

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