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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
tarpush command

Jump to

Keyboard shortcuts

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