[pkg/ottl] Add private interface for path and key #29704
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This is the first PR working towards #22744.
It adds 2 new interfaces,
path
andkey
, that will be given to contexts to use when interpreting the paths/keys passed from the grammar. Eventually we'll be able to use theisComplete
functions during parsing to ensure that all parts of the path were used by the context.By the end of that issue we'll have removed all public API's of OTTL's grammar, which is going to cause massive breaking changes to all our contexts and huge PRs. To help decrease the amount of changes per PR these new interfaces are not yet exported and not yet implemented. To see them partially in use checkout #29703.
Link to tracking Issue:
Related to #22744
Testing:
Added unit tests
Documentation:
I'll add godoc comments once these things are made public