image

package
v0.0.0-...-67d9101 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

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

Image is many Layers

func NewImage

func NewImage(globals *types.Global, layers []*Layer, config *config.Config, tags []string) *Image

NewImage creates a new *Image for use

func (*Image) Flatten

func (i *Image) Flatten(tw io.Reader) (string, error)

Flatten copies a tarred up series of files (passed in through the io.Reader handle) to the image where they are untarred. Returns the filename of the image created.

type Layer

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

Layer is one unit of storage.

func NewLayer

func NewLayer(globals *types.Global, id string) *Layer

NewLayer creates a new *Layer for use

func Unpack

func Unpack(globals *types.Global, file string) ([]*Layer, string, error)

Unpack unpacks an image into the temporary filesystem. Returns a list of paths for each layer. Information about the image itself is not written to disk; the tarballs are just dumped.

First return value is the order of the layers. Then, the directory of the files kept so it can be removed later. The dir will always be returned if possible; even when a later operation returns an error.

func (*Layer) ChainID

func (l *Layer) ChainID() string

ChainID returns the chain id

func (*Layer) Copy

func (l *Layer) Copy(tw *tar.Writer, tf *os.File) error

Copy copies a layer into the tarfile.

func (*Layer) LayerID

func (l *Layer) LayerID() string

LayerID returns the layer id.

Jump to

Keyboard shortcuts

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