cache

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const MetadataLabel = "io.buildpacks.lifecycle.cache.metadata"

Variables

This section is empty.

Functions

func NewCachingImage

func NewCachingImage(image imgutil.Image, cache *VolumeCache) imgutil.Image

Types

type ImageCache

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

func NewImageCache

func NewImageCache(origImage imgutil.Image, newImage imgutil.Image) *ImageCache

func NewImageCacheFromName

func NewImageCacheFromName(name string, keychain authn.Keychain) (*ImageCache, error)

func (*ImageCache) AddLayerFile

func (c *ImageCache) AddLayerFile(tarPath string, diffID string) error

func (*ImageCache) Commit

func (c *ImageCache) Commit() error

func (*ImageCache) Name

func (c *ImageCache) Name() string

func (*ImageCache) RetrieveLayer

func (c *ImageCache) RetrieveLayer(diffID string) (io.ReadCloser, error)

func (*ImageCache) RetrieveMetadata

func (c *ImageCache) RetrieveMetadata() (lifecycle.CacheMetadata, error)

func (*ImageCache) ReuseLayer

func (c *ImageCache) ReuseLayer(diffID string) error

func (*ImageCache) SetMetadata

func (c *ImageCache) SetMetadata(metadata lifecycle.CacheMetadata) error

type VolumeCache

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

func NewVolumeCache

func NewVolumeCache(dir string) (*VolumeCache, error)

func (*VolumeCache) AddLayer

func (c *VolumeCache) AddLayer(rc io.ReadCloser, diffID string) error

func (*VolumeCache) AddLayerFile

func (c *VolumeCache) AddLayerFile(tarPath string, diffID string) error

func (*VolumeCache) Commit

func (c *VolumeCache) Commit() error

func (*VolumeCache) HasLayer

func (c *VolumeCache) HasLayer(diffID string) (bool, error)

func (*VolumeCache) Name

func (c *VolumeCache) Name() string

func (*VolumeCache) RetrieveLayer

func (c *VolumeCache) RetrieveLayer(diffID string) (io.ReadCloser, error)

func (*VolumeCache) RetrieveLayerFile

func (c *VolumeCache) RetrieveLayerFile(diffID string) (string, error)

func (*VolumeCache) RetrieveMetadata

func (c *VolumeCache) RetrieveMetadata() (lifecycle.CacheMetadata, error)

func (*VolumeCache) ReuseLayer

func (c *VolumeCache) ReuseLayer(diffID string) error

func (*VolumeCache) SetMetadata

func (c *VolumeCache) SetMetadata(metadata lifecycle.CacheMetadata) error

Jump to

Keyboard shortcuts

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