packagecache

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GlobalVolumePrefix = "crib-cache-"

GlobalVolumePrefix is the prefix shared by all crib cache volumes.

Variables

This section is empty.

Functions

func BuildCacheMounts

func BuildCacheMounts(providers []string) []string

BuildCacheMounts returns cache mount target paths for use during image builds. Feature install scripts run as root, so home-relative paths use /root. For apt, both /var/cache/apt and /var/lib/apt/lists are included.

func SupportedProviders

func SupportedProviders() []string

SupportedProviders returns the list of known cache provider names.

func ValidateProviders

func ValidateProviders(providers []string) []string

ValidateProviders returns provider names that are not recognized.

func VolumeName

func VolumeName(workspaceID, provider string) string

VolumeName returns the Docker volume name for a workspace's cache provider.

func VolumePrefix

func VolumePrefix(workspaceID string) string

VolumePrefix returns the volume name prefix for a workspace's cache volumes.

Types

type Plugin

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

Plugin shares host package caches via named Docker volumes.

func New

func New(providers []string) *Plugin

New creates a package cache plugin for the given providers. Unknown providers are skipped at runtime. Use ValidateProviders to check for unknown names before creating the plugin.

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns the plugin identifier.

func (*Plugin) PreContainerRun

PreContainerRun returns volume mounts for each configured cache provider.

Jump to

Keyboard shortcuts

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