store

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailabilityModeDescMap

func AvailabilityModeDescMap() map[AvailabilityMode]string

Types

type AvailabilityMode

type AvailabilityMode int
const (
	Available AvailabilityMode = iota
	Absent
	BadImageName
	RegistryUnavailable
	AuthnFailure
	AuthzFailure
	UnknownError
)

func (AvailabilityMode) String

func (a AvailabilityMode) String() string

type ContainerInfo

type ContainerInfo struct {
	Namespace      string
	ControllerKind string
	ControllerName string
	Container      string
}

type ImageInfo

type ImageInfo struct {
	Info      map[ContainerInfo]struct{}
	LastCheck time.Time
	AvailMode AvailabilityMode
}

type ImageStore

type ImageStore struct {
	// contains filtered or unexported fields
}

func NewImageStore

func NewImageStore() *ImageStore

func (*ImageStore) AddOrUpdateImage

func (imgStore *ImageStore) AddOrUpdateImage(imageName string, lastCheck time.Time, availMode ...AvailabilityMode)

func (*ImageStore) ExtractMetrics

func (imgStore *ImageStore) ExtractMetrics() (ret []prometheus.Metric)

func (*ImageStore) Length

func (imgStore *ImageStore) Length() int

func (*ImageStore) PopOldestImages

func (imgStore *ImageStore) PopOldestImages(count int) (ret []string)

func (*ImageStore) RemoveContainerAssociation

func (imgStore *ImageStore) RemoveContainerAssociation(image, namespace, kind, name, container string)

func (*ImageStore) RemoveImage

func (imgStore *ImageStore) RemoveImage(imageName string)

func (*ImageStore) UpdateContainerAssociations

func (imgStore *ImageStore) UpdateContainerAssociations(image string, containerInfos []ContainerInfo)

Jump to

Keyboard shortcuts

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