# Functions
Combine takes two AST and try to combine both of them into a single AST, notes that this operation is not a merges and will return an error if position to merge are not compatible type or if the key is already present in the target AST.
Copy creates a copy rule.
CopyAllToList creates a CopyAllToListRule.
CopyToList creates a CopyToListRule.
CountComp is a comparison operation which returns true if compareOp evaluates true.
DeleteFile creates a DeleteFileStep.
ExecFile creates a ExecFileStep.
ExtractListItem creates a ExtractListItemRule.
Filter returns a new Filter Rule.
FilterValues returns a new FilterValues Rule.
FilterValuesWithRegexp returns a new FilterValuesWithRegexp Rule.
FixStream creates a FixStreamRule.
InjectAgentInfo creates a InjectAgentInfoRule.
InjectHeaders creates a InjectHeadersRule.
InjectIndex creates a InjectIndexRule.
InjectQueue creates a InjectQueueRule.
InjectStreamProcessor creates a InjectStreamProcessorRule.
Insert inserts a node into an existing AST, will return and error if the target position cannot accept a new node.
InsertDefaults creates a InsertDefaultsRule.
Lookup accept an AST and a selector and return the matching Node at that position.
LookupString accepts an AST and a selector and return the matching node at that position as a string.
MakeArray creates a MakeArrayRule.
Map creates a new map rule.
MoveFile creates a MoveFileStep.
MustNewAST create a new AST based on a map[string]iface and panic on any errors.
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.
NewASTFromConfig takes a config and converts 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.
NewRuleList returns a new list of rules to be executed.
NewStepList returns a new list of rules to be executed.
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.
RemoveKey creates a RemoveKeyRule.
Rename creates a rename rule.
RenderInputs renders dynamic inputs section.
Select takes an AST and a selector and will return a sub AST based on the selector path, will return false if the path could not be found.
SelectInto creates a SelectIntoRule.
Translate create a translation rule.
TranslateWithRegexp create a translation rule.
# 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.
CopyAllToListRule is a rule which copies a all nodes into every item in a provided list.
CopyRule take a from Selector and a destination selector and will insert an existing node into the destination, will return an errors if the types are incompatible.
CopyToListRule is a rule which copies a specified node into every item in a provided list.
DeleteFileStep removes a file from disk.
Dict represents a dictionary in the Tree, where each key is a entry into an array.
ExecFileStep executes a file.
ExtractListItemRule extract items with specified name from a list of maps.
FilterRule allows to filter the tree and return only a subset of selectors.
FilterValuesRule allows to filter the tree and return only a subset of selectors with a predefined set of values.
FilterValuesWithRegexpRule allows to filter the tree and return only a subset of selectors with a regular expression.
FixStreamRule fixes streams to contain default values in case no value or invalid value are provided.
FloatVal represents a float.
InjectAgentInfoRule injects agent information into each rule.
InjectHeadersRule injects headers into output.
InjectIndexRule injects index to each input.
InjectQueueRule injects inferred queue parameters into program configurations.
InjectStreamProcessorRule injects a add fields processor providing stream type, namespace and dataset fields into events.
InsertDefaultsRule inserts selected paths into keys if they do not exist.
IntVal represents an int.
Key represents a Key / value pair in the dictionary.
List represents a slice in our Tree.
MakeArrayRule transforms a single value into an array of length 1.
MapRule allow to apply mutliples rules on a subset of a Tree based on a provided selector.
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.
MoveFileStep moves a file to a new location.
RemoveKeyRule removes key from a dict.
RenameRule takes a selectors and will rename the last path of a Selector to a new name.
RuleList is a container that allow the same tree to be executed on multiple defined Rule.
SelectIntoRule inserts selected paths into a new Dict node.
StepList is a container that allow the same tree to be executed on multiple defined Step.
StrVal represents a string.
TranslateRule take a selector and will try to replace any values that match the translation table.
TranslateWithRegexpRule take a selector and will try to replace using the regular expression.
UIntVal represents an int.
Vars is a context of variables that also contain a list of processors that go with the mapping.
# Interfaces
AgentInfo is an interface to get the agent info.
Node represents a node in the configuration Tree a Node can point to one or multiples children nodes.
Rule defines a rule that can be Applied on the Tree.
Step is an execution step which needs to be run.
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
CompOp is operation used for comparing counts in CountComp.
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.