pullprogress

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPullProgressWriter

func NewPullProgressWriter(reportFn func(*ProgressReport)) io.Writer

NewPullProgressWriter creates a writer that periodically reports on pull progress of an image. It only reports when the state of the different layers has changed and uses time threshholds to limit the rate of the reports.

Types

type Detail

type Detail struct {
	Current int64 `json:"current"`
	Total   int64 `json:"total"`
}

Detail is the progressDetail structure in a Docker pull progress line

type ProgressReport

type ProgressReport struct {
	Waiting     int
	Downloading int
	Extracting  int
	Complete    int

	DownloadPct float32
}

ProgressReport is a report of the progress of an image pull. It provides counts of layers in a given state. It also provides a percentage of downloaded data of those layers that are currently getting downloaded

type Status

type Status struct {
	ID             string `json:"id"`
	Status         string `json:"status"`
	ProgressDetail Detail `json:"progressDetail"`
	Progress       string `json:"progress"`
}

Status is a structure representation of a Docker pull progress line

Jump to

Keyboard shortcuts

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