package
8.15.2+incompatible
Repository: https://github.com/elastic/elastic-agent.git
Documentation: pkg.go.dev
# Functions
Insert inserts a node into an existing AST, will return and error if the target position cannot accept a new node.
Lookup accept an AST and a selector and return the matching Node at that position.
NewAST takes a map and convert it to an internal Tree, allowing us to executes rules on the data to shape it in a different way or to filter some of the information.
NewBoolVal creates a new bool value node with provided value.
NewBoolValWithProcessors creates a new bool value node with provided value with processors attached.
NewDict creates a new dict with provided nodes.
NewDictWithProcessors creates a new dict with provided nodes and attached processors.
NewFloatVal creates a new float value node with provided value.
NewFloatValWithProcessors creates a new float value node with provided value with processors attached.
NewIntVal creates a new int value node with provided value.
NewIntValWithProcessors creates a new int value node with provided value and attached processors.
NewKey creates a new key with provided name node pair.
NewList creates a new list with provided nodes.
NewListWithProcessors creates a new list with provided nodes with processors attached.
NewStrVal creates a new string value node with provided value.
NewStrValWithProcessors creates a new string value node with provided value and processors.
NewUIntVal creates a new uint value node with provided value.
NewUIntValWithProcessors creates a new uint value node with provided value with processors attached.
NewVars returns a new instance of vars.
NewVarsWithProcessors returns a new instance of vars with attachment of processors.
RenderInputs renders dynamic inputs section.
# Variables
ErrNoMatch is return when the replace didn't fail, just that no vars match to perform the replace.
# Structs
AST represents a raw configuration which is purely data, only primitives are currently supported, Int, float, string and bool.
BoolVal represents a boolean in our Tree.
Dict represents a dictionary in the Tree, where each key is a entry into an array.
FloatVal represents a float.
IntVal represents an int.
Key represents a Key / value pair in the dictionary.
List represents a slice in our Tree.
MapVisitor visit the Tree and return a map[string]interface{}, this map can be serialized to a YAML document.
MapVisitorDict Visitor used for the visiting the Dict.
MapVisitorList is a visitor to visit list.
StrVal represents a string.
UIntVal represents an int.
Vars is a context of variables that also contain a list of processors that go with the mapping.
# Interfaces
Node represents a node in the configuration Tree a Node can point to one or multiples children nodes.
Visitor defines the interface to use when visiting all the nodes in the Tree.
VisitorDict to use when visiting a Dict.
VisitorList to use when visiting a List.
# Type aliases
Processors represent an attached list of processors.
Selector defines a path to access an element in the Tree, currently selectors only works when the target is a Dictionary, accessing list values are not currently supported by any methods using selectors.