cache

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	HasLayer(string) bool
	GetLayer(string) (io.ReadCloser, error)
	SetLayer(string, io.Reader) (io.ReadCloser, error)
	Invalidate(string) error
}

type FileCache

type FileCache struct {
	RootDir string
}

func NewFileCache

func NewFileCache(dir string) (*FileCache, error)

func (*FileCache) GetLayer

func (c *FileCache) GetLayer(layerId string) (io.ReadCloser, error)

func (*FileCache) HasLayer

func (c *FileCache) HasLayer(layerId string) bool

func (*FileCache) Invalidate

func (c *FileCache) Invalidate(layerId string) error

func (*FileCache) SetLayer

func (c *FileCache) SetLayer(layerId string, r io.Reader) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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