oci

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCaches

func ClearCaches()

ClearCaches clears all package-level caches. This is primarily used for testing to ensure tests don't interfere with each other via cached values. Note: This only clears global caches. Component-scoped caches (blob, imageFiles) are automatically released when the component's context goes out of scope.

func WithComponentCache added in v0.8.120

func WithComponentCache(ctx context.Context) context.Context

WithComponentCache returns a new context with a fresh component-scoped cache. Use this to scope blob and image files caches to a single component evaluation. When the context goes out of scope, the cached data becomes eligible for GC.

Types

type ComponentCache added in v0.8.120

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

ComponentCache holds per-component caches for heavy OCI data (blobs and image files). These are the two largest cache types — blobs can be 1-10 MB each, and image files can also be substantial. Scoping them per-component prevents unbounded memory growth when validating many components with unique image refs.

Lighter caches (manifests, descriptors, image indexes) remain global because they are small and benefit from cross-component sharing (e.g., shared task bundle manifests).

Jump to

Keyboard shortcuts

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