imgio

package
v0.0.0-...-3a5da77 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 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 Docker

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

Docker implements image i/o (overmount.Importer and overmount.Exporter) through docker. Note that no attempt will be made to pull the images from remote sources; they must exist on your client's daemon before they can be used by this import/export interface.

func NewDocker

func NewDocker(c *client.Client) (*Docker, error)

NewDocker creates a new *Docker for use. If c is nil, `client.NewEnvClient()` will be called to initiate a new client.

func (*Docker) Export

func (d *Docker) Export(repo *om.Repository, layer *om.Layer, tags []string) (io.ReadCloser, error)

Export produces a tar represented as an io.ReadCloser from the Layer provided.

func (*Docker) Import

func (d *Docker) Import(r *om.Repository, reader io.ReadCloser) ([]*om.Layer, error)

Import takes a tar represented as an io.Reader, and converts and unpacks it into the overmount repository. Returns the top-most layer and any error.

type OCI

type OCI struct{}

OCI implements writing to OCI format image trees. These trees are then tarred and compressed for distribution purposes.

func NewOCI

func NewOCI() *OCI

NewOCI creates a new *OCI.

func (*OCI) Export

func (o *OCI) Export(repo *om.Repository, layer *om.Layer, tags []string) (io.ReadCloser, error)

Export exports an OCI image to the reader as a tar file.

Jump to

Keyboard shortcuts

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