cache

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageTagCache

type ImageTagCache interface {
	HasTag(imageName string, imageTag string) bool
	GetTag(imageName string, imageTag string) (*tag.ImageTag, error)
	SetTag(imageName string, imgTag *tag.ImageTag)
	ClearCache()
	NumEntries() int
}

func NewMemCache

func NewMemCache() ImageTagCache

NewMemCache returns a new instance of MemCache

type KnownImage added in v0.5.0

type KnownImage struct {
	ImageName    string
	Applications []string
}

KnownImage represents a known image and the applications using it, without any version/tag information.

type MemCache

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

func (*MemCache) ClearCache added in v0.4.0

func (mc *MemCache) ClearCache()

ClearCache clears the cache

func (*MemCache) GetTag

func (mc *MemCache) GetTag(imageName string, tagName string) (*tag.ImageTag, error)

GetTag gets a tag entry from the cache

func (*MemCache) HasTag

func (mc *MemCache) HasTag(imageName string, tagName string) bool

HasTag returns true if cache has entry for given tag, false if not

func (*MemCache) NumEntries added in v0.5.0

func (mc *MemCache) NumEntries() int

NumEntries returns the number of entries in the cache

func (*MemCache) SetImage added in v0.5.0

func (mc *MemCache) SetImage(imageName, application string)

func (*MemCache) SetTag

func (mc *MemCache) SetTag(imageName string, imgTag *tag.ImageTag)

SetTag sets a tag entry into the cache

Jump to

Keyboard shortcuts

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