entities

package
v2.17.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolvePropValue

func ResolvePropValue(key string, props map[any]any) (any, bool)

The ResolvePropValue function is designed to work with nested maps where keys are structured using dots to represent nested levels. It recursively traverses the nested maps to find the value associated with the specified key.

If the key is found, the function returns the associated value and true. If the key is not found, it returns nil and false.

Types

type EntityMap

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

func New

func New() *EntityMap

func (*EntityMap) Get

func (*EntityMap) GetResolvedEntity

func (r *EntityMap) GetResolvedEntity(config coordinate.Coordinate) (ResolvedEntity, bool)

func (*EntityMap) GetResolvedProperty

func (r *EntityMap) GetResolvedProperty(coordinate coordinate.Coordinate, propertyName string) (any, bool)

func (*EntityMap) Put

func (r *EntityMap) Put(resolvedEntity ResolvedEntity)

type ResolvedEntity

type ResolvedEntity struct {
	// EntityName is the name returned by the Dynatrace api. In theory should be the
	// same as the `name` property defined in the configuration, but
	// can differ.
	EntityName string

	// Coordinate of the config.Config this entity represents
	Coordinate coordinate.Coordinate

	// Properties defines a map of all already resolved parameters
	Properties parameter.Properties

	// Skip flag indicating that this entity was skipped
	// if an entity is skipped, there will be no properties
	Skip bool
}

ResolvedEntity represents the Dynatrace configuration entity of a config.Config

Jump to

Keyboard shortcuts

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