contentutil

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 24 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 NewStoreWithProvider added in v0.13.0

func NewStoreWithProvider(cs content.Store, p content.Provider) content.Store

func ProviderFromRef

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

func RegisterContentPayloadTypes added in v0.12.0

func RegisterContentPayloadTypes(ctx context.Context) context.Context

RegisterContentPayloadTypes registers content types that are not defined by default but that we expect to find in registry images.

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.InfoReaderProvider) *MultiProvider

NewMultiProvider creates a new mutable provider with a base provider

func (*MultiProvider) Add

Add adds a new child provider for a specific digest

func (*MultiProvider) Info added in v0.13.0

func (mp *MultiProvider) Info(ctx context.Context, dgst digest.Digest) (content.Info, error)

Info returns a content.Info

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

func (*MultiProvider) UnlazySession added in v0.11.2

func (mp *MultiProvider) UnlazySession(desc ocispecs.Descriptor) session.Group

Jump to

Keyboard shortcuts

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