transform

package
v0.0.0-...-6244b48 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAll

func ApplyAll(filter ast.FilterNode, passes []CompilerPass) (ast.FilterNode, error)

ApplyAll applies all the compiler passes serially and returns the resulting tree. This method copies the passes AST before executing the compiler passes.

Types

type CompilerPass

type CompilerPass interface {
	// Exec executes the pass on the provided AST. This method may either return
	// a new AST or the existing modified AST. Note that the parameter to this
	// method may be changed directly.
	Exec(filter ast.FilterNode) (ast.FilterNode, error)
}

CompilerPass is an interface which defines an implementation capable of accepting an input AST and making optimizations or changes, and returning a new (or the existing) AST.

func PrometheusKeySanitizePass

func PrometheusKeySanitizePass() CompilerPass

PrometheusKeySanitizePass returns a

func UnallocatedReplacementPass

func UnallocatedReplacementPass() CompilerPass

UnallocatedReplacementPass returns a CompilerPass implementation which replaces all __unallocated__ with empty string

Jump to

Keyboard shortcuts

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