MCPcopy Index your code
hub / github.com/expr-lang/expr / MaxNodes

Function MaxNodes

expr.go:222–226  ·  view source on GitHub ↗

MaxNodes sets the maximum number of nodes allowed in the expression. By default, the maximum number of nodes is conf.DefaultMaxNodes. If MaxNodes is set to 0, the node budget check is disabled.

(n uint)

Source from the content-addressed store, hash-verified

220// By default, the maximum number of nodes is conf.DefaultMaxNodes.
221// If MaxNodes is set to 0, the node budget check is disabled.
222func MaxNodes(n uint) Option {
223 return func(c *conf.Config) {
224 c.MaxNodes = n
225 }
226}
227
228// Compile parses and compiles given input expression to bytecode program.
229func Compile(input string, ops ...Option) (*vm.Program, error) {

Callers 2

TestMaxNodesFunction · 0.92
TestMaxNodesDisabledFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestMaxNodesFunction · 0.74
TestMaxNodesDisabledFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…