bundle

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

View Source
const ANNOTATION_BUNDLE_ID = "com.github.mgoltzsche.ctnr.bundle.id"

Variables

This section is empty.

Functions

func DeleteDirSafely

func DeleteDirSafely(dir string) (err error)

Types

type Bundle

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

func NewBundle

func NewBundle(dir string) (r Bundle, err error)

func (*Bundle) Created

func (b *Bundle) Created() time.Time

func (*Bundle) Dir

func (b *Bundle) Dir() string

func (*Bundle) ID

func (b *Bundle) ID() string

func (*Bundle) Image

func (b *Bundle) Image() *digest.Digest

func (*Bundle) LastUsed

func (b *Bundle) LastUsed() (t time.Time, err error)

func (*Bundle) Lock

func (b *Bundle) Lock() (lb *LockedBundle, err error)

func (*Bundle) MarkUsed

func (b *Bundle) MarkUsed() (err error)

Update mod time so that gc doesn't touch it for a while

type BundleImage

type BundleImage interface {
	ID() digest.Digest
	// Returns the image's configuration - never nil
	Config() *ispecs.Image
	Unpack(dest string) error
}

type BundleStore

type BundleStore interface {
	CreateBundle(id string, update bool) (*LockedBundle, error)
	Bundle(id string) (Bundle, error)
	Bundles() ([]Bundle, error)
	BundleGC(ttl time.Duration, containers ContainerStore) ([]Bundle, error)
}

type ContainerStore

type ContainerStore interface {
	Exist(id string) (bool, error)
}

type LockedBundle

type LockedBundle struct {
	// contains filtered or unexported fields
}

func CreateLockedBundle

func CreateLockedBundle(dir string, update bool) (r *LockedBundle, err error)

func OpenLockedBundle

func OpenLockedBundle(bundle Bundle) (*LockedBundle, error)

func (*LockedBundle) Close

func (b *LockedBundle) Close() (err error)

func (*LockedBundle) Delete

func (b *LockedBundle) Delete() (err error)

func (*LockedBundle) Dir

func (b *LockedBundle) Dir() string

func (*LockedBundle) ID

func (b *LockedBundle) ID() string

func (*LockedBundle) Image

func (b *LockedBundle) Image() *digest.Digest

Returns the bundle's image ID

func (*LockedBundle) SetParentImageId

func (b *LockedBundle) SetParentImageId(imageID *digest.Digest) (err error)

func (*LockedBundle) SetSpec

func (b *LockedBundle) SetSpec(spec *rspecs.Spec) (err error)

func (*LockedBundle) Spec

func (b *LockedBundle) Spec() (*rspecs.Spec, error)

func (*LockedBundle) UpdateRootfs

func (b *LockedBundle) UpdateRootfs(image BundleImage) (err error)

Updates the rootfs if the image changed

type SpecGenerator

type SpecGenerator interface {
	Spec(rootfs string) (*rspecs.Spec, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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