native

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (ocibundle.Bundle, error)

New returns a bundle interface to create/delete an OCI bundle from an OCI image ref.

Types

type Bundle

type Bundle struct {
	ocibundle.Bundle
	// contains filtered or unexported fields
}

Bundle is a native OCI bundle, created from imageRef.

func (*Bundle) Create

func (b *Bundle) Create(ctx context.Context, ociConfig *specs.Spec) error

Create will created the on-disk structures for the OCI bundle, so that it is ready for execution.

func (*Bundle) Delete

func (b *Bundle) Delete(_ context.Context) error

Delete erases OCI bundle created an OCI image ref. Context argument isn't used here, but is part of the Bundle interface which is defined under pkg/, so changing this API is not possible until next major version.

func (*Bundle) ImageSpec

func (b *Bundle) ImageSpec() (imgSpec *imgspecv1.Image)

ImageSpec returns the OCI image spec associated with the bundle.

func (*Bundle) Path

func (b *Bundle) Path() string

Path returns the bundle's path on disk.

func (*Bundle) Update

func (b *Bundle) Update(_ context.Context, ociConfig *specs.Spec) error

Update will update the OCI config for the OCI bundle, so that it is ready for execution. Context argument isn't used here, but is part of the Bundle interface which is defined under pkg/, so changing this API is not possible until next major version.

type Option

type Option func(b *Bundle) error

func OptBundlePath

func OptBundlePath(bp string) Option

OptBundlePath sets the path that the bundle will be created at.

func OptImageRef

func OptImageRef(ref string) Option

OptImageRef sets the image source reference, from which the bundle will be created.

func OptImgCache

func OptImgCache(ic *cache.Handle) Option

OptImgCache sets the Singularity image cache used to pull through OCI blobs.

func OptSysCtx

func OptSysCtx(sc *types.SystemContext) Option

OptSysCtx sets the OCI client SystemContext holding auth information etc. Deprecated: please use OptTransportOptions

func OptTmpDir

func OptTmpDir(tmpDir string) Option

OptTempDir sets the parent temporary directory for temporary files generated outside of the assembled bundle.

func OptTransportOptions added in v4.1.0

func OptTransportOptions(tOpts *ociimage.TransportOptions) Option

OptTransportOptions sets configuration for interaction with image transports.

Jump to

Keyboard shortcuts

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