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)
| 220 | // By default, the maximum number of nodes is conf.DefaultMaxNodes. |
| 221 | // If MaxNodes is set to 0, the node budget check is disabled. |
| 222 | func 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. |
| 229 | func Compile(input string, ops ...Option) (*vm.Program, error) { |
no outgoing calls
searching dependent graphs…