litefunc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package litefunc implements config-defined expr functions that are inlined at compile time via AST patching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapCompileError

func WrapCompileError(p *Patcher, err error) error

Types

type Environment

type Environment string
const (
	EnvMatch         Environment = "match"
	EnvExtendedMatch Environment = "extended_match"
	EnvAggregation   Environment = "aggregation"
	EnvProjections   Environment = "projections"
	EnvGroupBy       Environment = "group_by_expr"
	EnvNormalize     Environment = "normalize"
)

type Patcher

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

Patcher inlines lite function calls at the AST level during expr compilation.

func (*Patcher) Err

func (p *Patcher) Err() error

func (*Patcher) Visit

func (p *Patcher) Visit(node *ast.Node)

type Registry

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

func Load

func Load(dir string) (*Registry, error)

func LoadBytes

func LoadBytes(data []byte) (*Registry, error)

func (*Registry) CompileOpts

func (r *Registry) CompileOpts(env Environment) ([]expr.Option, *Patcher)

func (*Registry) Get

func (r *Registry) Get(name string) *funcDef

func (*Registry) Names

func (r *Registry) Names() []string

func (*Registry) NewPatcher

func (r *Registry) NewPatcher(env Environment) *Patcher

func (*Registry) Summary

func (r *Registry) Summary() []string

func (*Registry) ValidateConflicts

func (r *Registry) ValidateConflicts(registeredSymbols []string) error

Jump to

Keyboard shortcuts

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