content

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 24 Imported by: 222

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Command is the cli command for managing content
	Command = cli.Command{
		Name:  "content",
		Usage: "manage content",
		Subcommands: cli.Commands{
			activeIngestCommand,
			deleteCommand,
			editCommand,
			fetchCommand,
			fetchObjectCommand,
			getCommand,
			ingestCommand,
			listCommand,
			pushObjectCommand,
			setLabelsCommand,
		},
	}
)

Functions

func Display

func Display(w io.Writer, statuses []StatusInfo, start time.Time)

Display pretty prints out the download or upload progress

func Fetch

func Fetch(ctx context.Context, client *containerd.Client, ref string, config *FetchConfig) (images.Image, error)

Fetch loads all resources into the content store and returns the image

Types

type FetchConfig added in v1.2.0

type FetchConfig struct {
	// Resolver
	Resolver remotes.Resolver
	// ProgressOutput to display progress
	ProgressOutput io.Writer
	// Labels to set on the content
	Labels []string
	// Platforms to fetch
	Platforms []string
}

FetchConfig for content fetch

func NewFetchConfig added in v1.2.0

func NewFetchConfig(ctx context.Context, clicontext *cli.Context) (*FetchConfig, error)

NewFetchConfig returns the default FetchConfig from cli flags

type StatusInfo

type StatusInfo struct {
	Ref       string
	Status    string
	Offset    int64
	Total     int64
	StartedAt time.Time
	UpdatedAt time.Time
}

StatusInfo holds the status info for an upload or download

Jump to

Keyboard shortcuts

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