bundle

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const LIST_NAME = "Bundles.json"
View Source
const LOCAL_CONTENT_TAG = "LOCAL"
View Source
const LOCAL_PYTHON_TAG = "PYTHON"
View Source
const SPEC_NAME = "bundle.json"

Variables

This section is empty.

Functions

func FilterNonLocal

func FilterNonLocal(ori [][]*prefab.Prefab) (filtered [][]*prefab.Prefab)

Types

type AssembleConfig

type AssembleConfig struct {
	ClosureName         string
	ClosureVersion      string
	ClosurePath         string // ignore the ClosurePath when ClosureName and ClosureVersion are given
	NewName             string
	NewVersion          string
	Overwrite           bool
	IgnoreGPU           bool
	NvidiaDriverVersion string
}

type Bundle

type Bundle struct {
	Id           string
	Prefabs      map[string]string // Prefab Name -> Prefab Specifier
	PrefabIndexs map[string]int    // Prefab Name -> PrefabPaths Index
	PrefabPaths  []string
	PrefabIDs    []string
	LocalDir     string
	LocalDirCnt  int
	BasePath     string
	Blueprint    *prefab.Blueprint
	Size         uint64
}

type BundleManager

type BundleManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewBundleManager

func NewBundleManager(workDir string, upstream string) (bm *BundleManager, err error)

func (*BundleManager) AddBundleID

func (bm *BundleManager) AddBundleID(name string, version string, bundleID string) (err error)

func (*BundleManager) Assemble

func (bm *BundleManager) Assemble(blueprint prefab.Blueprint, basePath string, dctx *dcontext.DeployContext) (err error)

assemble the blueprint into a given bundle blueprintPath must be an absoulute path

func (*BundleManager) AssembleHandler

func (bm *BundleManager) AssembleHandler(cfg AssembleConfig) error

func (*BundleManager) CreateContainer added in v0.2.3

func (bm *BundleManager) CreateContainer(bundle *Bundle) (id string, rootFs string, imgConfig specs.ImageConfig, err error)

func (*BundleManager) CreateContainerById added in v0.2.3

func (bm *BundleManager) CreateContainerById(bundleId string) (id string, rootFs string, imgConfig specs.ImageConfig, err error)

func (*BundleManager) CreateContainerByName added in v0.2.3

func (bm *BundleManager) CreateContainerByName(name string, version string) (id string, rootFs string, imgConfig specs.ImageConfig, err error)

func (*BundleManager) DeleteAllBundles

func (bm *BundleManager) DeleteAllBundles() (err error)

func (*BundleManager) DeleteAllContainers added in v0.2.3

func (bm *BundleManager) DeleteAllContainers() (err error)

func (*BundleManager) DeleteBundle

func (bm *BundleManager) DeleteBundle(name string, version string) (err error)

if version == "", delete all versions of a bundle

func (*BundleManager) DeleteById added in v0.2.3

func (bm *BundleManager) DeleteById(id string) (err error)

func (*BundleManager) DeleteContainer added in v0.2.3

func (bm *BundleManager) DeleteContainer(id string) (err error)

func (*BundleManager) Exist

func (bm *BundleManager) Exist(name, version string) (exists bool)

func (*BundleManager) Get

func (bm *BundleManager) Get(name string, version string) (bundle *Bundle, err error)

func (*BundleManager) GetById added in v0.2.3

func (bm *BundleManager) GetById(id string) (bundle *Bundle, err error)

func (*BundleManager) List

func (bm *BundleManager) List() (bundles []*Bundle, err error)

func (*BundleManager) ListNames added in v0.2.3

func (bm *BundleManager) ListNames() (bundleNames []string)

func (*BundleManager) Pack

func (bm *BundleManager) Pack(blueprint prefab.Blueprint, basePath string, dstDir string, keepURL bool) (taskcPath string, blueprintPath string, err error)

func (*BundleManager) PackHandler

func (bm *BundleManager) PackHandler(cfg PackConfig) (err error)

func (*BundleManager) RequestClosure

func (bm *BundleManager) RequestClosure(name string, version string, dstDir string) (filename string, err error)

func (*BundleManager) Upload

func (bm *BundleManager) Upload(repoType string, taskcPath string, blueprintPath string) (err error)

type PackConfig

type PackConfig struct {
	BundleName     string
	BundleVersion  string
	BlueprintPath  string // ignore the BlueprintPath when BundleName and BundleVersion are given
	NewName        string
	NewVersion     string
	DstDir         string
	KeepURL        bool
	UploadRegistry bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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