rootfs

package
v0.0.0-...-adbe259 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetries int = 3

DefaultRetries is the default number of retries

View Source
var MaxBackoff float64 = 30

MaxBackoff is the maximum backoff time per retry in seconds

Functions

This section is empty.

Types

type PullableImage

type PullableImage struct {
	// Name of image to pull
	Name string
	// Path to registry cert
	Cert *string
	// Number of attempts to retry pulling
	Retries int
	// Metadata for rootfs extraction
	Spec Spec
	// contains filtered or unexported fields
}

PullableImage contains metadata necessary for pulling images

func NewPullableImage

func NewPullableImage(path string) (*PullableImage, error)

NewPullableImage initializes a PullableImage spec from a user provided config

func (*PullableImage) Pull

func (pullable *PullableImage) Pull() (*PulledImage, error)

Pull a v1.Image and initialize a PulledImage struct to include the v1.img and metadata for extracting to a rootfs

type PulledImage

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

PulledImage using provided PullableImage

func (*PulledImage) Digest

func (pulledImg *PulledImage) Digest() (string, error)

Digest from pulled image

func (*PulledImage) Extract

func (pulledImg *PulledImage) Extract() error

Extract rootfs

type Spec

type Spec struct {
	// Destination to extract to
	Dest string
	// User to chown files in rootfs to
	User string
	// Use the subuid associated with the given user for chowning
	UseSubuid bool
	// contains filtered or unexported fields
}

Spec for rootfs extraction

Jump to

Keyboard shortcuts

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