executor

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2016 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// LoadConfig loads the configuration into the executor.
	LoadConfig(*config.Config) error

	// Config returns the current *Config for the executor.
	Config() *config.Config

	// ImageID returns the image identifier of the most recent layer.
	ImageID() string

	// Commit commits an entry to the layer list.
	Commit(string, Hook) error

	// CheckCache consults the cache to see if there are any items which fit it.
	CheckCache(string) (bool, error)

	// Flatten copies a tarred up series of files (passed in through the
	// io.Reader handle) to the image where they are untarred. The first argument
	// is the parent image to use.
	Flatten(string, int64, io.Reader) error

	// CopyFromContainer copies a series of files in a similar fashion to
	// CopyToContainer, just in reverse.
	CopyFromContainer(string, string) (io.Reader, int64, error)

	// CopyFromContainer copies a series of files in a similar fashion to
	// CopyToContainer, just in reverse.
	CopyToContainer(string, io.Reader) error

	// CopyOneFileFromContainer copies a file from the container and returns its content.
	CopyOneFileFromContainer(string) ([]byte, error)

	// Create a container. Returns the container ID.
	Create() (string, error)

	// Destroy a container by ID.
	Destroy(string) error

	// Tag the current layer. Takes a tag name as argument.
	Tag(string) error

	// Pull an image. Takes a name and returns an image ID+error.
	Fetch(string) (string, error)

	// RunHook is used to manage run invocations, and is processed by the run
	// statement.
	RunHook(string) (string, error)

	// SetStdin turns on the stdin features during run invocations. It is used to
	// facilitate debugging.
	SetStdin(bool)

	// UseCache determines if the cache should be considered or not.
	UseCache(bool)

	// UseTTY determines whether or not to allow docker to use a TTY for both run and pull operations.
	UseTTY(bool)

	// SetSkipLayers toggles whether or not to skip layers that are being built
	// next. Toggle again to re-enable layer recording. The final image will not
	// contain the skipped layers.
	SetSkipLayers(ok bool)

	// MakeImage makes the final image, skipping any layers as necessary. The
	// layers must be pre-recorded within the executor.
	// It returns an error condition, if any.
	MakeImage() error
}

Executor is an engine for talking to different layering/execution context subsystems. It is the meat-and-potatoes of image building.

type Hook

type Hook func(id string) (string, error)

Hook is a hook used in commit calls

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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