reader

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheOption

type CacheOption func(*cacheOptions)

func WithCacheOpts

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

func WithFilter

func WithFilter(filter func(*estargz.TOCEntry) bool) CacheOption

func WithReader

func WithReader(sr *io.SectionReader) CacheOption

type Reader

type Reader interface {
	OpenFile(name string) (io.ReaderAt, error)
	Lookup(name string) (*estargz.TOCEntry, bool)
	Cache(opts ...CacheOption) error
}

type VerifiableReader

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

VerifiableReader produces a Reader with a given verifier.

func NewReader

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

func (*VerifiableReader) SkipVerify

func (vr *VerifiableReader) SkipVerify() Reader

func (*VerifiableReader) VerifyTOC

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