policycache

package
v1.8.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v1.8.0

type Cache interface {
	// Set inserts a policy in the cache
	Set(string, kyvernov1.PolicyInterface)
	// Unset removes a policy from the cache
	Unset(string)
	// GetPolicies returns all policies that apply to a namespace, including cluster-wide policies
	// If the namespace is empty, only cluster-wide policies are returned
	GetPolicies(PolicyType, string, string) []kyvernov1.PolicyInterface
}

Cache get method use for to get policy names and mostly use to test cache testcases

func NewCache added in v1.8.0

func NewCache() Cache

NewCache create a new Cache

type PolicyType

type PolicyType uint8

PolicyType represents types of policies

const (
	Mutate PolicyType = 1 << iota
	ValidateEnforce
	ValidateAudit
	Generate
	VerifyImagesMutate
	VerifyImagesValidate
	VerifyYAML
)

Types of policies

Jump to

Keyboard shortcuts

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