source

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TarExtract added in v0.9.0

func TarExtract(src Source, dir string, args ...string) error

TarExtract extracts all files from a source to a directory

Types

type DockerSource

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

TODO: Make this a generic "OCISource" as it now only depends on the generic providers.Runtime

func NewDockerSource

func NewDockerSource() *DockerSource

func (*DockerSource) Cleanup

func (ds *DockerSource) Cleanup() (err error)

func (*DockerSource) Parse

func (ds *DockerSource) Parse(ociRef meta.OCIImageRef) (*api.OCIImageSource, error)

func (*DockerSource) Reader

func (ds *DockerSource) Reader() (rc io.ReadCloser, err error)

func (*DockerSource) Ref added in v0.6.0

func (ds *DockerSource) Ref() meta.OCIImageRef

type Source

type Source interface {
	// Ref returns the reference of the source
	Ref() meta.OCIImageRef

	// Parse verifies the ImageSource, fills in any missing fields and prepares the reader
	Parse(src meta.OCIImageRef) (*api.OCIImageSource, error)

	// Reader provides a tar stream reader
	Reader() (io.ReadCloser, error)

	// Cleanup cleans up any temporary assets after reading
	Cleanup() error
}

Source represents a source for VM images

Jump to

Keyboard shortcuts

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