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

Method Exec

interpreter/async.go:100–115  ·  view source on GitHub ↗

Exec implements the InterpretableV2 interface method.

(frame *ExecutionFrame)

Source from the content-addressed store, hash-verified

98
99// Exec implements the InterpretableV2 interface method.
100func (fn *evalAsyncFunc) Exec(frame *ExecutionFrame) ref.Val {
101 argVals := make([]ref.Val, len(fn.args))
102 var unk *types.Unknown
103 for i, arg := range fn.args {
104 argVals[i] = arg.Exec(frame)
105 if types.IsError(argVals[i]) {
106 return argVals[i]
107 }
108 unk, _ = types.MaybeMergeUnknowns(argVals[i], unk)
109 }
110 if unk != nil {
111 return unk
112 }
113 result := frame.ComputeResult(fn.ID(), fn.Function(), fn.OverloadID(), fn.impl, argVals)
114 return types.LabelErrNode(fn.id, result)
115}
116
117// asyncCallStateTracker manages async call states across re-evaluations of a single program.
118type asyncCallStateTracker struct {

Callers 3

EvalMethod · 0.95

Calls 8

IDMethod · 0.95
FunctionMethod · 0.95
OverloadIDMethod · 0.95
IsErrorFunction · 0.92
MaybeMergeUnknownsFunction · 0.92
LabelErrNodeFunction · 0.92
ComputeResultMethod · 0.80
ExecMethod · 0.65

Tested by 2