Documentation
¶
Index ¶
- Variables
- func GetBlueprintResourceFromComponentDescriptor(cd *types.ComponentDescriptor, blueprintName string) (types.Resource, error)
- func GetBlueprintResourceFromComponentVersion(componentVersion model.ComponentVersion, blueprintName string) (model.Resource, error)
- func RegisterStoreMetrics(reg prometheus.Registerer)
- type Blueprint
- func New(blueprint *lsv1alpha1.Blueprint, content vfs.FileSystem) *Blueprint
- func NewFromFs(content vfs.FileSystem) (*Blueprint, error)
- func Resolve(ctx context.Context, registryAccess model.RegistryAccess, ...) (*Blueprint, error)
- func ResolveBlueprint(ctx context.Context, registry model.RegistryAccess, ...) (*Blueprint, error)
Constants ¶
This section is empty.
Variables ¶
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 ¶
func Resolve(ctx context.Context, registryAccess model.RegistryAccess, cdRef *lsv1alpha1.ComponentDescriptorReference, bpDef lsv1alpha1.BlueprintDefinition) (*Blueprint, error)
Resolve returns a blueprint from a given reference. If no fs is given, a temporary filesystem will be created.
func ResolveBlueprint ¶
func ResolveBlueprint(ctx context.Context, registry model.RegistryAccess, cdRef *lsv1alpha1.ComponentDescriptorReference, bpDef lsv1alpha1.BlueprintDefinition) (*Blueprint, error)
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.