ocipush

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(fs fs.FS) (content.Provider, error)

NewProvider creates a containerd content.Provider from the given fs.FS. The FS is expected to use the oci-layout.

func Push

func Push(ctx context.Context, provider content.Provider, ref string, desc v1.Descriptor) error

Push is a helper function to push content from the providced content.Provider. This is just a wrapper around containerd's `remotes.PushContent` which sets up a remotes.Resolver using the provdied ref. The generated resolver will use whatever autth is set in the Docker CLI's config.

Types

type FsProvider

type FsProvider struct {
	Fs fs.FS
}

FsProvider is a containerd content.Provider that uses an fs.FS to implement the content.Provider interface. The FS must be an OCI layout.

func (*FsProvider) ReaderAt

func (p *FsProvider) ReaderAt(ctx context.Context, desc v1.Descriptor) (content.ReaderAt, error)

ReaderAt implements containerd's content.Provider interface.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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