package contentutil

import "github.com/moby/buildkit/util/contentutil"

Index

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, opts ...ResolveOptFunc) (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.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

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

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

func (*MultiProvider) UnlazySession

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

type ResolveOpt

type ResolveOpt struct {
	Credentials func(string) (string, string, error)
}

type ResolveOptFunc

type ResolveOptFunc func(*ResolveOpt)

func WithCredentials

func WithCredentials(c func(string) (string, string, error)) ResolveOptFunc

Source Files

buffer.go copy.go fetcher.go multiprovider.go pusher.go refs.go source.go storewithprovider.go types.go

Version
v0.20.2
Published
Mar 24, 2025
Platform
js/wasm
Imports
24 packages
Last checked
2 minutes ago

Tools for package owners.