Documentation ¶
Overview ¶
Package tarball provides facilities for reading/writing v1.Images from/to a tarball on-disk.
Index ¶
- func Image(opener Opener, tag *name.Tag) (v1.Image, error)
- func ImageFromPath(path string, tag *name.Tag) (v1.Image, error)
- func LayerFromFile(path string) (v1.Layer, error)
- func LayerFromOpener(opener Opener) (v1.Layer, error)
- func LayerFromReader(reader io.Reader) (v1.Layer, error)
- func MultiRefWrite(refToImage map[name.Reference]v1.Image, w io.Writer) error
- func MultiRefWriteToFile(p string, refToImage map[name.Reference]v1.Image) error
- func MultiWrite(tagToImage map[name.Tag]v1.Image, w io.Writer) error
- func MultiWriteToFile(p string, tagToImage map[name.Tag]v1.Image) error
- func Write(ref name.Reference, img v1.Image, w io.Writer) error
- func WriteToFile(p string, ref name.Reference, img v1.Image) error
- type Opener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageFromPath ¶
ImageFromPath returns a v1.Image from a tarball located on path.
func LayerFromFile ¶
LayerFromFile returns a v1.Layer given a tarball
func LayerFromOpener ¶
LayerFromOpener returns a v1.Layer given an Opener function
func LayerFromReader ¶
LayerFromReader returns a v1.Layer given a io.Reader.
func MultiRefWrite ¶
MultiRefWrite 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 MultiRefWriteToFile ¶
MultiRefWriteToFile writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.MultiRefWrite with a new file.
func MultiWrite ¶
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 ¶
MultiWriteToFile writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.MultiWrite with a new file.