contentutil

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 22 Imported by: 197

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor, ref string, logger func([]byte)) error

func CopyChain

func CopyChain(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor) error

func FromFetcher

func FromFetcher(f remotes.Fetcher) content.Provider

func FromPusher

func FromPusher(p remotes.Pusher) content.Ingester

func HasSource added in v0.10.5

func HasSource(info content.Info, refspec reference.Spec) (bool, error)

func IngesterFromRef

func IngesterFromRef(ref string) (content.Ingester, error)

func ProviderFromRef

func ProviderFromRef(ref string) (ocispecs.Descriptor, content.Provider, error)

Types

type Buffer

type Buffer interface {
	content.Provider
	content.Ingester
	content.Manager
}

Buffer is a content provider and ingester that keeps data in memory

func NewBuffer

func NewBuffer() Buffer

NewBuffer returns a new buffer

type MultiProvider

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

MultiProvider is a provider backed by a mutable map of providers

func NewMultiProvider

func NewMultiProvider(base content.Provider) *MultiProvider

NewMultiProvider creates a new mutable provider with a base provider

func (*MultiProvider) Add

func (mp *MultiProvider) Add(dgst digest.Digest, p content.Provider)

Add adds a new child provider for a specific digest

func (*MultiProvider) CheckDescriptor added in v0.9.1

func (mp *MultiProvider) CheckDescriptor(ctx context.Context, desc ocispecs.Descriptor) error

func (*MultiProvider) ReaderAt

ReaderAt returns a content.ReaderAt

func (*MultiProvider) SnapshotLabels added in v0.10.0

func (mp *MultiProvider) SnapshotLabels(descs []ocispecs.Descriptor, index int) map[string]string

Jump to

Keyboard shortcuts

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