bundlecollection

package
Version: v2.367.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle interface {
	Install(sourcePath, pathInBundle string) (path string, err error)
	InstallWithoutContents() (path string, err error)
	Uninstall() (err error)

	IsInstalled() (bool, error)
	GetInstallPath() (path string, err error)

	Enable() (path string, err error)
	Disable() (err error)
}

type BundleCollection

type BundleCollection interface {
	Get(defintion BundleDefinition) (bundle Bundle, err error)
	List() ([]Bundle, error)
}

type BundleDefinition

type BundleDefinition interface {
	BundleName() string
	BundleVersion() string
}

BundleDefinition uniquely identifies an asset within a BundleCollection (e.g. Job, Package)

type FileBundle

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

func NewFileBundle

func NewFileBundle(
	installPath, enablePath string,
	fileMode os.FileMode,
	fs boshsys.FileSystem,
	timeProvider clock.Clock,
	compressor fileutil.Compressor,
	detector tarpath.Detector,
	logger boshlog.Logger,
) FileBundle

func (FileBundle) Disable

func (b FileBundle) Disable() error

func (FileBundle) Enable

func (b FileBundle) Enable() (string, error)

func (FileBundle) GetInstallPath

func (b FileBundle) GetInstallPath() (string, error)

func (FileBundle) Install

func (b FileBundle) Install(sourcePath, pathInBundle string) (string, error)

func (FileBundle) InstallWithoutContents

func (b FileBundle) InstallWithoutContents() (string, error)

func (FileBundle) IsInstalled

func (b FileBundle) IsInstalled() (bool, error)

func (FileBundle) Uninstall

func (b FileBundle) Uninstall() error

type FileBundleCollection

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

func NewFileBundleCollection

func NewFileBundleCollection(
	installPath, enablePath, name string,
	fileMode os.FileMode,
	fs boshsys.FileSystem,
	timeProvider clock.Clock,
	compressor fileutil.Compressor,
	logger boshlog.Logger,
) FileBundleCollection

func (FileBundleCollection) Get

func (bc FileBundleCollection) Get(definition BundleDefinition) (Bundle, error)

func (FileBundleCollection) List

func (bc FileBundleCollection) List() ([]Bundle, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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