reader

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestSuiteReader added in v0.11.0

func TestSuiteReader(t *testing.T, store metadata.Store)

Types

type CacheOption

type CacheOption func(*cacheOptions)

func WithCacheOpts

func WithCacheOpts(cacheOpts ...cache.Option) CacheOption

func WithFilter

func WithFilter(filter func(int64) bool) CacheOption

func WithReader

func WithReader(sr *io.SectionReader) CacheOption

type Reader

type Reader interface {
	OpenFile(id uint32) (io.ReaderAt, error)
	Metadata() metadata.Reader
	Close() error
	LastOnDemandReadTime() time.Time
}

type VerifiableReader

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

VerifiableReader produces a Reader with a given verifier.

func NewReader

func NewReader(r metadata.Reader, cache cache.BlobCache, layerSha digest.Digest) (*VerifiableReader, error)

NewReader creates a Reader based on the given stargz blob and cache implementation. It returns VerifiableReader so the caller must provide a metadata.ChunkVerifier to use for verifying file or chunk contained in this stargz blob.

func (*VerifiableReader) Cache added in v0.9.0

func (vr *VerifiableReader) Cache(opts ...CacheOption) (err error)

func (*VerifiableReader) Close added in v0.6.0

func (vr *VerifiableReader) Close() error

func (*VerifiableReader) Metadata added in v0.10.0

func (vr *VerifiableReader) Metadata() metadata.Reader

func (*VerifiableReader) SkipVerify added in v0.3.0

func (vr *VerifiableReader) SkipVerify() Reader

func (*VerifiableReader) VerifyTOC added in v0.3.0

func (vr *VerifiableReader) VerifyTOC(tocDigest digest.Digest) (Reader, error)

Jump to

Keyboard shortcuts

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