blobcache

package
v5.31.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobCache

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

BlobCache is an object which saves copies of blobs that are written to it while passing them through to some real destination, and which can be queried directly in order to read them back.

Implements types.ImageReference.

func NewBlobCache

func NewBlobCache(ref types.ImageReference, directory string, compress types.LayerCompression) (*BlobCache, error)

NewBlobCache creates a new blob cache that wraps an image reference. Any blobs which are written to the destination image created from the resulting reference will also be stored as-is to the specified directory or a temporary directory. The compress argument controls whether or not the cache will try to substitute a compressed or different version of a blob when preparing the list of layers when reading an image.

func (*BlobCache) ClearCache

func (b *BlobCache) ClearCache() error

func (*BlobCache) DeleteImage

func (b *BlobCache) DeleteImage(ctx context.Context, sys *types.SystemContext) error

func (*BlobCache) Directory

func (b *BlobCache) Directory() string

func (*BlobCache) DockerReference

func (b *BlobCache) DockerReference() reference.Named

func (*BlobCache) HasBlob

func (b *BlobCache) HasBlob(blobinfo types.BlobInfo) (bool, int64, error)

func (*BlobCache) NewImage

func (b *BlobCache) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error)

func (*BlobCache) NewImageDestination

func (b *BlobCache) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error)

func (*BlobCache) NewImageSource

func (b *BlobCache) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error)

func (*BlobCache) PolicyConfigurationIdentity

func (b *BlobCache) PolicyConfigurationIdentity() string

func (*BlobCache) PolicyConfigurationNamespaces

func (b *BlobCache) PolicyConfigurationNamespaces() []string

func (*BlobCache) StringWithinTransport

func (b *BlobCache) StringWithinTransport() string

func (*BlobCache) Transport

func (b *BlobCache) Transport() types.ImageTransport

Jump to

Keyboard shortcuts

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