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

Method ContextEval

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

ContextEval evaluates the program with a set of input variables and a context object in order to support cancellation and timeouts. This method must be used in conjunction with the InterruptCheckFrequency() option for cancellation interrupts to be impact evaluation. The vars value may either be an

(context.Context, any)

Source from the content-addressed store, hash-verified

57 //
58 // The output contract for `ContextEval` is otherwise identical to the `Eval` method.
59 ContextEval(context.Context, any) (ref.Val, *EvalDetails, error)
60
61 // ConcurrentEval evaluates the program concurrently, returning a channel that will receive
62 // the final EvalResult when all asynchronous operations complete, or the context expires.

Callers 12

TestNilProgramFunction · 0.95
TestEvalFunction · 0.65
TestContextEvalFunction · 0.65
TestContextEvalUnknownsFunction · 0.65
BenchmarkContextEvalFunction · 0.65
Example_cel_ContextEvalFunction · 0.65

Implementers 1

progcel/program.go

Calls

no outgoing calls

Tested by 12

TestNilProgramFunction · 0.76
TestEvalFunction · 0.52
TestContextEvalFunction · 0.52
TestContextEvalUnknownsFunction · 0.52
BenchmarkContextEvalFunction · 0.52
Example_cel_ContextEvalFunction · 0.52