bundle

package
v0.0.0-...-bfa9622 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildModelRepresentation

func BuildModelRepresentation(
	status *params.FullStatus,
	modelExtractor ModelExtractor,
	useExistingMachines bool,
	bundleMachines map[string]string,
) (*bundlechanges.Model, error)

BuildModelRepresentation creates a buildchanges.Model, representing the existing deployment, to be used while deploying or diffing a bundle.

func ComposeAndVerifyBundle

func ComposeAndVerifyBundle(base BundleDataSource, pathToOverlays []string) (*charm.BundleData, []error, error)

ComposeAndVerifyBundle merges base and overlays then verifies the combined bundle data. Returns a slice of errors encountered while processing the bundle. They are for informational purposes and do not require failing the bundle deployment.

Types

type BundleDataSource

type BundleDataSource interface {
	Parts() []*charm.BundleDataPart
	BasePath() string
	ResolveInclude(path string) ([]byte, error)
}

BundleDataSource is implemented by types that can parse bundle data into a list of composable parts.

type ModelExtractor

type ModelExtractor interface {
	GetAnnotations(tags []string) ([]params.AnnotationsGetResult, error)
	GetConstraints(applications ...string) ([]constraints.Value, error)
	GetConfig(branchName string, applications ...string) ([]map[string]interface{}, error)
	Sequences() (map[string]int, error)
}

ModelExtractor provides everything we need to build a bundlechanges.Model from a model API connection.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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