Documentation ¶
Overview ¶
Package cache provides methods to cache layers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("layer was not found")
ErrNotFound is returned by Get when no layer with the given Hash is found.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { // Put writes the Layer to the Cache. // // The returned Layer should be used for future operations, since lazy // cachers might only populate the cache when the layer is actually // consumed. // // The returned layer can be consumed, and the cache entry populated, // by calling either Compressed or Uncompressed and consuming the // returned io.ReadCloser. Put(v1.Layer) (v1.Layer, error) // Get returns the Layer cached by the given Hash, or ErrNotFound if no // such layer was found. Get(v1.Hash) (v1.Layer, error) // Delete removes the Layer with the given Hash from the Cache. Delete(v1.Hash) error }
Cache encapsulates methods to interact with cached layers.
func NewFilesystemCache ¶
NewFilesystemCache returns a Cache implementation backed by files.
Click to show internal directories.
Click to hide internal directories.