Documentation
¶
Index ¶
- func NewReport(progress Progress) types.Report
- type ContainerStatus
- func (u *ContainerStatus) CurrentImageID() wt.ImageID
- func (u *ContainerStatus) Error() string
- func (u *ContainerStatus) ID() wt.ContainerID
- func (u *ContainerStatus) ImageName() string
- func (u *ContainerStatus) LatestImageID() wt.ImageID
- func (u *ContainerStatus) Name() string
- func (u *ContainerStatus) State() string
- type Progress
- func (m Progress) Add(update *ContainerStatus)
- func (m Progress) AddScanned(cont types.Container, newImage types.ImageID)
- func (m Progress) AddSkipped(cont types.Container, err error)
- func (m Progress) MarkForUpdate(containerID types.ContainerID)
- func (m Progress) Report() types.Report
- func (m Progress) UpdateFailed(failures map[types.ContainerID]error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerStatus ¶
type ContainerStatus struct {
// contains filtered or unexported fields
}
ContainerStatus contains the container state during a session
func UpdateFromContainer ¶
func UpdateFromContainer(cont types.Container, newImage types.ImageID, state State) *ContainerStatus
UpdateFromContainer sets various status fields from their corresponding container equivalents
func (*ContainerStatus) CurrentImageID ¶
func (u *ContainerStatus) CurrentImageID() wt.ImageID
CurrentImageID returns the image ID that the container used when the session started
func (*ContainerStatus) Error ¶
func (u *ContainerStatus) Error() string
Error returns the error (if any) that was encountered for the container during a session
func (*ContainerStatus) ID ¶
func (u *ContainerStatus) ID() wt.ContainerID
ID returns the container ID
func (*ContainerStatus) ImageName ¶
func (u *ContainerStatus) ImageName() string
ImageName returns the name:tag that the container uses
func (*ContainerStatus) LatestImageID ¶
func (u *ContainerStatus) LatestImageID() wt.ImageID
LatestImageID returns the newest image ID found during the session
func (*ContainerStatus) Name ¶
func (u *ContainerStatus) Name() string
Name returns the container name
func (*ContainerStatus) State ¶
func (u *ContainerStatus) State() string
State returns the current State that the container is in
type Progress ¶
type Progress map[types.ContainerID]*ContainerStatus
Progress contains the current session container status
func (Progress) Add ¶
func (m Progress) Add(update *ContainerStatus)
Add a container to the map using container ID as the key
func (Progress) AddScanned ¶
AddScanned adds a container to the Progress with the state set as scanned
func (Progress) AddSkipped ¶
AddSkipped adds a container to the Progress with the state set as skipped
func (Progress) MarkForUpdate ¶
func (m Progress) MarkForUpdate(containerID types.ContainerID)
MarkForUpdate marks the container identified by containerID for update
func (Progress) UpdateFailed ¶
func (m Progress) UpdateFailed(failures map[types.ContainerID]error)
UpdateFailed updates the containers passed, setting their state as failed with the supplied error