cache

package
v3.0.0-alpha.2+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package cache provides support for automatic caching of any image supported by containers/image

Index

Constants

View Source
const (
	// DirEnv specifies the environment variable which can set the directory
	// for image downloads to be cached in
	DirEnv = "SINGULARITY_CACHEDIR"

	// RootDefault specifies the directory inside of ${HOME} that images are
	// cached in by default.
	// Uses "~/.singularity/cache" which will not clash with any 2.x cache
	// directory.
	RootDefault = ".singularity/cache"

	// LibraryDir is the directory inside the cache.Dir where library images are cached
	LibraryDir = "library"
	// ShubDir is the directory inside the cache.Dir where shub images are cached
	ShubDir = "shub"
)
View Source
const (
	// OciBlobDir is the directory inside cache.Dir() where oci images are cached
	OciBlobDir = "oci"
	// OciTempDir is the directory inside cache.Dir() where splatted out oci images live
	OciTempDir = "oci-tmp"
)

Variables

This section is empty.

Functions

func Clean

func Clean()

Clean wipes all files in the cache directory

func Library

func Library() string

Library returns the directory inside the cache.Dir() where library images are cached

func OciBlob

func OciBlob() string

OciBlob returns the directory inside cache.Dir() where oci blobs are cached

func OciTemp

func OciTemp() string

OciTemp returns the directory inside cache.Dir() where splatted out oci images live

func OciTempExists

func OciTempExists(sum, name string) (bool, error)

OciTempExists returns whether the image with the given sha sum exists in the OciTemp() cache

func OciTempImage

func OciTempImage(sum, name string) string

OciTempImage creates a OciTempDir/sum directory and returns the abs path of the image

func Root

func Root() string

Root is the root location where all of singularity caching happens. Library, Shub, and oci image formats supported by containers/image repository will be cached inside

Defaults to ${HOME}/.singularity/cache

func Shub

func Shub() string

Shub returns the directory inside the cache.Dir() where shub images are cached

Types

This section is empty.

Jump to

Keyboard shortcuts

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