contentutil

package
v0.0.0-...-2745715 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

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

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

func IngesterFromRef

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

func NewStoreWithProvider

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

func ProviderFromRef

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

func RegisterContentPayloadTypes

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.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

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

func (*MultiProvider) ReaderAt

ReaderAt returns a content.ReaderAt

func (*MultiProvider) SnapshotLabels

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

func (*MultiProvider) UnlazySession

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