resourcedefinitions

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSchema added in v0.5.0

GenSchema generates the schema for the resource definition.

This function performs the following logic:

  1. Quickly perform schema aligning to select common parts between multiple rules' template.
  2. Refill the same default value to the variable schema if allowed. The default value comes from the SchemaDefaultValue of the matching rule.

func MatchResourceDefinition added in v0.5.0

func MatchResourceDefinition(
	resourceDefinitions []*model.ResourceDefinition,
	metadata types.MatchResourceMetadata,
) (*model.ResourceDefinition, *model.ResourceDefinitionMatchingRule)

MatchResourceDefinition takes a list of resource definitions and the resource metadata, and returns the matched resource definition and the matched matching rule. If no resource definition matches, it returns nil.

func SyncBuiltinResourceDefinitions added in v0.5.0

func SyncBuiltinResourceDefinitions(ctx context.Context, m builtin.BusMessage) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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