tarball

package
v0.0.0-...-ec4d356 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tarball provides facilities for reading/writing v1.Images from/to a tarball on-disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Image

func Image(opener Opener, tag *name.Tag) (v1.Image, error)

Image exposes an image from the tarball at the provided path.

func ImageFromPath

func ImageFromPath(path string, tag *name.Tag) (v1.Image, error)

func LayerFromFile

func LayerFromFile(path string) (v1.Layer, error)

LayerFromFile returns a v1.Layer given a tarball

func LayerFromOpener

func LayerFromOpener(opener Opener) (v1.Layer, error)

LayerFromOpener returns a v1.Layer given an Opener function

func MultiWrite

func MultiWrite(tagToImage map[name.Tag]v1.Image, w io.Writer) error

MultiWrite writes the contents of each image to the provided reader, in the compressed format. The contents are written in the following format: One manifest.json file at the top level containing information about several images. One file for each layer, named after the layer's SHA. One file for the config blob, named after its SHA.

func MultiWriteToFile

func MultiWriteToFile(p string, tagToImage map[name.Tag]v1.Image) error

MultiWriteToFile writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.MultiWrite with a new file.

func Write

func Write(tag name.Tag, img v1.Image, w io.Writer) error

Write is a wrapper to write a single image and tag to a tarball.

func WriteToFile

func WriteToFile(p string, tag name.Tag, img v1.Image) error

WriteToFile writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.Write with a new file.

Types

type Opener

type Opener func() (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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