Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Display ¶
func Display(w io.Writer, statuses []StatusInfo, start time.Time)
Display pretty prints out the download or upload progress. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L412-L452
func ShowProgress ¶
ShowProgress continuously updates the output with job progress by checking status in the content store.
Types ¶
type Jobs ¶
type Jobs struct {
// contains filtered or unexported fields
}
Jobs provides a way of identifying the download keys for a particular task encountering during the pull walk.
This is very minimal and will probably be replaced with something more featured.
func New ¶
New creates a new instance of the job status tracker. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L351-L357
func (*Jobs) Add ¶
func (j *Jobs) Add(desc ocispec.Descriptor)
Add adds a descriptor to be tracked. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L359-L370
func (*Jobs) IsResolved ¶
IsResolved checks whether a descriptor has been resolved. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L381-L386
func (*Jobs) Jobs ¶
func (j *Jobs) Jobs() []ocispec.Descriptor
Jobs returns a list of all tracked descriptors. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L372-L379
type StatusInfo ¶
type StatusInfo struct { Ref string Status StatusInfoStatus Offset int64 Total int64 StartedAt time.Time UpdatedAt time.Time }
StatusInfo holds the status info for an upload or download. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L402-L410
type StatusInfoStatus ¶
type StatusInfoStatus string
StatusInfoStatus describes status info for an upload or download. From https://github.com/containerd/containerd/blob/v1.7.0-rc.2/cmd/ctr/commands/content/fetch.go#L388-L400
const ( StatusResolved StatusInfoStatus = "resolved" StatusResolving StatusInfoStatus = "resolving" StatusWaiting StatusInfoStatus = "waiting" StatusCommitting StatusInfoStatus = "committing" StatusDone StatusInfoStatus = "done" StatusDownloading StatusInfoStatus = "downloading" StatusUploading StatusInfoStatus = "uploading" StatusExists StatusInfoStatus = "exists" )