MCPcopy Create free account
hub / github.com/cel-expr/cel-go / prog

Struct prog

cel/program.go:249–280  ·  view source on GitHub ↗

prog is the internal implementation of the Program interface.

Source from the content-addressed store, hash-verified

247
248// prog is the internal implementation of the Program interface.
249type prog struct {
250 *Env
251 evalOpts EvalOption
252 defaultVars Activation
253 dispatcher interpreter.Dispatcher
254 interpreter interpreter.Interpreter
255 interruptCheckFrequency uint
256
257 // Intermediate state used to configure the InterpretableDecorator set provided
258 // to the initInterpretable call.
259 plannerOptions []interpreter.PlannerOption
260 regexOptimizations []*interpreter.RegexOptimization
261
262 // Interpretable configured from an Ast and aggregate decorator set based on program options.
263 interpretable interpreter.InterpretableV2
264 observable *interpreter.ObservableInterpretable
265 callCostEstimator cost.ActualCostEstimator
266 costOptions []cost.TrackerOption
267 costLimit *uint64
268 memoryOptions []types.MemoryTrackerOption
269 memoryLimit *uint32
270
271 // hasAsync indicates the planned expression contains an asynchronous function call, which can
272 // only be resolved by ConcurrentEval.
273 hasAsync bool
274
275 // Async evaluation configuration used by ConcurrentEval.
276 drainStrategy async.DrainStrategy
277 asyncObserver async.Observer
278 asyncCompletionBufferSize int
279 asyncMaxConcurrency int
280}
281
282// scanOptTargets walks the AST once and reports whether the Optimize()
283// decorator (needOpt) and the regex-constant compiler (needRegex) have any

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected