Documentation ¶
Index ¶
- type ImageFetch
- func (s *ImageFetch) Add(ref, digest string)
- func (s *ImageFetch) AllDone()
- func (s *ImageFetch) GetLayers() (result []Status)
- func (s *ImageFetch) GetProgress() (current, total int64)
- func (s *ImageFetch) IsDone() bool
- func (s *ImageFetch) SetToDone(ref string)
- func (s *ImageFetch) SetToDownloading(ref string, offset, total int64)
- func (s *ImageFetch) SetToFailed()
- func (s *ImageFetch) SetToWaiting(ref string)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageFetch ¶
type ImageFetch struct { ContainerID string Image string Resolved bool Failed bool // contains filtered or unexported fields }
ImageFetch stores container pull status
func CreateImageFetch ¶
func CreateImageFetch(containerID, image string, resolved bool, layers map[string]*Status) *ImageFetch
CreateImageFetch creates new ImageFetch for given name
func NewImageFetch ¶
func NewImageFetch(containerID, image string) *ImageFetch
NewImageFetch creates new ImageFetch for given name
func (*ImageFetch) Add ¶
func (s *ImageFetch) Add(ref, digest string)
Add new layer ref to the progress list
func (*ImageFetch) GetLayers ¶
func (s *ImageFetch) GetLayers() (result []Status)
GetLayers return list of layers
func (*ImageFetch) GetProgress ¶
func (s *ImageFetch) GetProgress() (current, total int64)
GetProgress calculates current and total bytes of all layers
func (*ImageFetch) IsDone ¶
func (s *ImageFetch) IsDone() bool
IsDone return true if all bytes of all layers are downloaded
func (*ImageFetch) SetToDone ¶
func (s *ImageFetch) SetToDone(ref string)
SetToDone updates layer ref to the done state
func (*ImageFetch) SetToDownloading ¶
func (s *ImageFetch) SetToDownloading(ref string, offset, total int64)
SetToDownloading updates layer ref to the waiting state
func (*ImageFetch) SetToFailed ¶
func (s *ImageFetch) SetToFailed()
SetToFailed marks fetch to be failed
func (*ImageFetch) SetToWaiting ¶
func (s *ImageFetch) SetToWaiting(ref string)
SetToWaiting updates layer ref to the waiting state
Click to show internal directories.
Click to hide internal directories.