blueprints

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DiskUsage discloses disk used by the blueprint store
	DiskUsage = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: lsv1alpha1.LandscaperMetricsNamespaceName,
			Subsystem: storeSubsystemName,
			Name:      "disk_usage_bytes",
			Help:      "Bytes on disk currently used by blueprint store instance.",
		},
	)

	// StoredItems discloses the number of items stored by the blueprint store.
	StoredItems = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: lsv1alpha1.LandscaperMetricsNamespaceName,
			Subsystem: storeSubsystemName,
			Name:      "items_total",
			Help:      "Total number of items currently stored by the blueprint store.",
		},
	)
)

Functions

func GetBlueprintResourceFromComponentDescriptor

func GetBlueprintResourceFromComponentDescriptor(cd *types.ComponentDescriptor, blueprintName string) (types.Resource, error)

GetBlueprintResourceFromComponentDescriptor returns the blueprint resource from a component descriptor.

func GetBlueprintResourceFromComponentVersion

func GetBlueprintResourceFromComponentVersion(componentVersion model.ComponentVersion, blueprintName string) (model.Resource, error)

GetBlueprintResourceFromComponentVersion returns the blueprint resource from a component descriptor.

func RegisterStoreMetrics

func RegisterStoreMetrics(reg prometheus.Registerer)

RegisterStoreMetrics allows to register blueprint store metrics with a given prometheus registerer

Types

type Blueprint

type Blueprint struct {
	Info *lsv1alpha1.Blueprint
	Fs   vfs.FileSystem
}

Blueprint is the internal resolved type of a blueprint.

func New

func New(blueprint *lsv1alpha1.Blueprint, content vfs.FileSystem) *Blueprint

New creates a new internal Blueprint from a blueprint definition and its filesystem content.

func NewFromFs

func NewFromFs(content vfs.FileSystem) (*Blueprint, error)

NewFromFs creates a new internal Blueprint from a filesystem. The blueprint is automatically read from within the filesystem

func Resolve

Resolve returns a blueprint from a given reference. If no fs is given, a temporary filesystem will be created.

func ResolveBlueprint

ResolveBlueprint returns a blueprint from a given reference. If no fs is given, a temporary filesystem will be created.

func (*Blueprint) GetImportByName

func (b *Blueprint) GetImportByName(name string) *lsv1alpha1.ImportDefinition

func (*Blueprint) GetSubinstallations

func (b *Blueprint) GetSubinstallations() ([]*lsv1alpha1.InstallationTemplate, error)

GetSubinstallations gets the direct subinstallation templates for a blueprint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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