contentutil

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 16 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 ocispec.Descriptor) error

func CopyChain

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

func FromFetcher

func FromFetcher(f remotes.Fetcher) content.Provider

func FromPusher

func FromPusher(p remotes.Pusher) content.Ingester

func IngesterFromRef

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

func ProviderFromRef

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

Types

type Buffer

type Buffer interface {
	content.Provider
	content.Ingester
}

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) ReaderAt

func (mp *MultiProvider) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error)

ReaderAt returns a content.ReaderAt

Jump to

Keyboard shortcuts

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