cache

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	AddImage(trustPolicy string, imageRef string, result types.ImageInfo) error

	GetImage(trustPolicy string, imageRef string) (*types.ImageInfo, bool)

	AddAttestation(trustPolicy string, imageRef string, attestationType string, conditions []kyvernov1.AnyAllConditions) error

	GetAttestation(trustPolicy string, imageRef string, attestationType string, conditions []kyvernov1.AnyAllConditions) bool

	Clear()
}

func New

func New(options ...Option) (Cache, error)

type Option

type Option = func(*cache) error

func WithCacheEnabled

func WithCacheEnabled(b bool) Option

func WithLogger added in v0.6.19

func WithLogger(l *zap.SugaredLogger) Option

func WithMaxSize

func WithMaxSize(s int64) Option

func WithTTLDuration

func WithTTLDuration(t time.Duration) Option

Jump to

Keyboard shortcuts

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