image

package
v0.0.0-...-c0defea Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 7 Imported by: 0

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

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 []*api.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)

func (*ImageState) GetImageNamesCount

func (imageState *ImageState) GetImageNamesCount() int

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

func (*ImageState) HasNoAssociatedContainers

func (imageState *ImageState) HasNoAssociatedContainers() bool

func (*ImageState) MarshalJSON

func (imageState *ImageState) MarshalJSON() ([]byte, error)

func (*ImageState) RemoveContainerReference

func (imageState *ImageState) RemoveContainerReference(container *api.Container) error

func (*ImageState) RemoveImageName

func (imageState *ImageState) RemoveImageName(containerImageName string)

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 *api.Container)

func (*ImageState) UpdateImageState

func (imageState *ImageState) UpdateImageState(container *api.Container)

Jump to

Keyboard shortcuts

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