ipfs

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureImage

func EnsureImage(ctx context.Context, client *containerd.Client, stdout, stderr io.Writer, snapshotter string, scheme string, ref string, mode imgutil.PullMode, ocispecPlatforms []ocispec.Platform, unpack *bool, quiet bool, ipfsPath string, rFlags types.RemoteSnapshotterFlags) (*imgutil.EnsuredImage, error)

EnsureImage pull the specified image from IPFS.

func NewRegistry

func NewRegistry(options RegistryOptions) (http.Handler, error)

func Push

func Push(ctx context.Context, client *containerd.Client, rawRef string, layerConvert converter.ConvertFunc, allPlatforms bool, platform []string, ensureImage bool, ipfsPath string) (string, error)

Push pushes the specified image to IPFS.

Types

type RegistryOptions

type RegistryOptions struct {

	// Times to retry query on IPFS. Zero or lower value means no retry.
	ReadRetryNum int

	// ReadTimeout is timeout duration of a read request to IPFS. Zero means no timeout.
	ReadTimeout time.Duration

	// IpfsPath is the IPFS_PATH value to be used for ipfs command.
	IpfsPath string
}

RegistryOptions represents options to configure the registry.

Jump to

Keyboard shortcuts

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