bundle

package
v0.0.0-...-ed4b4ac Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

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) GC

func (b *Bundle) GC(before time.Time) (r bool, err error)

func (*Bundle) ID

func (b *Bundle) ID() string

func (*Bundle) Image

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

func (*Bundle) Lock

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

type BundleBuilder

type BundleBuilder struct {
	*generate.SpecBuilder
	// contains filtered or unexported fields
}

func Builder

func Builder(id string) *BundleBuilder

func BuilderFromImage

func BuilderFromImage(id string, image BundleImage) (b *BundleBuilder, err error)

func FromSpec

func FromSpec(spec *generate.SpecBuilder) *BundleBuilder

func (*BundleBuilder) Build

func (b *BundleBuilder) Build(dir string, update bool) (*LockedBundle, error)

func (*BundleBuilder) GetID

func (b *BundleBuilder) GetID() string

func (*BundleBuilder) SetID

func (b *BundleBuilder) SetID(id string)

type BundleImage

type BundleImage interface {
	ID() digest.Digest
	Config() (ispecs.Image, error)
	Unpack(dest string) error
}

type BundleStore

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

type LockedBundle

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

func CreateLockedBundle

func CreateLockedBundle(dir string, spec SpecGenerator, image BundleImage, 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

Reads image ID from cached spec

func (*LockedBundle) SetParentImageId

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

func (*LockedBundle) SetSpec

func (b *LockedBundle) SetSpec(specgen SpecGenerator) (err error)

func (*LockedBundle) Spec

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

func (*LockedBundle) UpdateRootfs

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

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