cache

package
v1.5.41 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cache contains common functions and names for test caching.

Index

Constants

View Source
const (
	// Name is the top-level cache directory name.
	Name = `clair-testing`

	// Layer is the layer cache directory name.
	Layer = `layer`
)

Variables

This section is empty.

Functions

func CheckedDirectory

func CheckedDirectory(p ...string) (string, error)

CheckedDirectory constructs a local filesystem path by joining additional path segments "p" to the top-level cache directory.

Additionally, it attempts to create all needed directories to be able to create files under the returned path.

func Path

func Path(p ...string) (string, error)

Path constructs a local filesystem path by joining additional path segments "p" to the top-level cache directory.

Only reports an error if os.UserCacheDir reports an error.

func Root

func Root(p ...string) (*os.Root, error)

Root opens the specified cache directory as an os.Root, creating directories as needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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