Documentation ¶
Index ¶
- type Image
- type ImageState
- func (imageState *ImageState) AddImageName(imageName string)
- func (imageState *ImageState) Fields() logger.Fields
- func (imageState *ImageState) GetImageID() string
- func (imageState *ImageState) GetImageNamesCount() int
- func (imageState *ImageState) GetPullSucceeded() bool
- func (imageState *ImageState) HasImageName(containerImageName string) bool
- func (imageState *ImageState) HasNoAssociatedContainers() bool
- func (imageState *ImageState) MarshalJSON() ([]byte, error)
- func (imageState *ImageState) RemoveContainerReference(container *apicontainer.Container) error
- func (imageState *ImageState) RemoveImageName(containerImageName string) bool
- func (imageState *ImageState) SetPullSucceeded(pullSucceeded bool)
- func (imageState *ImageState) String() string
- func (imageState *ImageState) UpdateContainerReference(container *apicontainer.Container)
- func (imageState *ImageState) UpdateImageState(container *apicontainer.Container)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageState ¶
type ImageState struct { // Image is the image corresponding to this ImageState. Image *Image // Containers are the containers that use this image. Containers []*apicontainer.Container `json:"-"` // PulledAt is the time when this image was pulled. PulledAt time.Time // LastUsedAt is the time when this image was used last time. LastUsedAt time.Time // PullSucceeded defines whether this image has been pulled successfully before, // this should be set to true when one of the pull image call succeeds. PullSucceeded bool // contains filtered or unexported fields }
ImageState represents a docker image and its state information such as containers associated with it
func (*ImageState) AddImageName ¶
func (imageState *ImageState) AddImageName(imageName string)
AddImageName adds image name to image state
func (*ImageState) Fields ¶
func (imageState *ImageState) Fields() logger.Fields
func (*ImageState) GetImageID ¶
func (imageState *ImageState) GetImageID() string
GetImageID returns id of image
func (*ImageState) GetImageNamesCount ¶
func (imageState *ImageState) GetImageNamesCount() int
GetImageNamesCount returns number of image names
func (*ImageState) GetPullSucceeded ¶
func (imageState *ImageState) GetPullSucceeded() bool
GetPullSucceeded safely returns the PullSucceeded of the imageState
func (*ImageState) HasImageName ¶
func (imageState *ImageState) HasImageName(containerImageName string) bool
HasImageName returns true if image state contains the containerImageName
func (*ImageState) HasNoAssociatedContainers ¶
func (imageState *ImageState) HasNoAssociatedContainers() bool
HasNoAssociatedContainers returns true if image has no associated containers, false otherwise
func (*ImageState) MarshalJSON ¶
func (imageState *ImageState) MarshalJSON() ([]byte, error)
MarshalJSON marshals image state
func (*ImageState) RemoveContainerReference ¶
func (imageState *ImageState) RemoveContainerReference(container *apicontainer.Container) error
RemoveContainerReference removes container reference from image state
func (*ImageState) RemoveImageName ¶
func (imageState *ImageState) RemoveImageName(containerImageName string) bool
RemoveImageName removes image name from image state
func (*ImageState) SetPullSucceeded ¶
func (imageState *ImageState) SetPullSucceeded(pullSucceeded bool)
SetPullSucceeded sets the PullSucceeded of the imageState
func (*ImageState) String ¶
func (imageState *ImageState) String() string
func (*ImageState) UpdateContainerReference ¶
func (imageState *ImageState) UpdateContainerReference(container *apicontainer.Container)
UpdateContainerReference updates container reference in image state
func (*ImageState) UpdateImageState ¶
func (imageState *ImageState) UpdateImageState(container *apicontainer.Container)
UpdateImageState updates image name and container reference in image state