imageverifycache

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Set Adds an image to the cache. The image is considered to be verified for the given rule in the policy
	// The entry outomatically expires after sometime
	// Returns true when the cache entry is added
	Set(ctx context.Context, policy kyvernov1.PolicyInterface, ruleName string, imageRef string) (bool, error)

	// Get Searches for the image verified using the rule in the policy in the cache
	// Returns true when the cache entry is found
	Get(ctx context.Context, policy kyvernov1.PolicyInterface, ruleName string, imagerRef string) (bool, error)
}

func DisabledImageVerifyCache

func DisabledImageVerifyCache() Client

func New

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

type Option

type Option = func(*cache) error

func WithCacheEnableFlag

func WithCacheEnableFlag(b bool) Option

func WithLogger

func WithLogger(l logr.Logger) 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