Documentation
¶
Index ¶
Constants ¶
const GlobalVolumePrefix = "crib-cache-"
GlobalVolumePrefix is the prefix shared by all crib cache volumes.
Variables ¶
This section is empty.
Functions ¶
func BuildCacheMounts ¶
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 ¶
ValidateProviders returns provider names that are not recognized.
func VolumeName ¶
VolumeName returns the Docker volume name for a workspace's cache provider.
func VolumePrefix ¶
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 ¶
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) PreContainerRun ¶
func (p *Plugin) PreContainerRun(_ context.Context, req *plugin.PreContainerRunRequest) (*plugin.PreContainerRunResponse, error)
PreContainerRun returns volume mounts for each configured cache provider.