image

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 7 Imported by: 68

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ImageID string
	Names   []string
	Size    int64
}

func (*Image) String added in v1.14.3

func (image *Image) String() string

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) GetImageNamesCount added in v1.14.4

func (imageState *ImageState) GetImageNamesCount() int

GetImageNamesCount returns number of image names

func (*ImageState) GetPullSucceeded added in v1.18.0

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 added in v1.14.1

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)

RemoveImageName removes image name from image state

func (*ImageState) SetPullSucceeded added in v1.18.0

func (imageState *ImageState) SetPullSucceeded(pullSucceeded bool)

SetPullSucceeded sets the PullSucceeded of the imageState

func (*ImageState) String added in v1.14.3

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

Jump to

Keyboard shortcuts

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