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

Function NewExecutionFrame

interpreter/frame.go:73–84  ·  view source on GitHub ↗

NewExecutionFrame creates a new execution frame from the pool.

(input any)

Source from the content-addressed store, hash-verified

71
72// NewExecutionFrame creates a new execution frame from the pool.
73func NewExecutionFrame(input any) (*ExecutionFrame, error) {
74 f := frameStack.Get().(*ExecutionFrame)
75 switch v := input.(type) {
76 case Activation:
77 f.Activation = v
78 case map[string]any:
79 f.Activation = activationInput.create(v)
80 default:
81 return nil, fmt.Errorf("invalid input, wanted Activation or map[string]any, got: (%T)%v", input, input)
82 }
83 return f, nil
84}
85
86// SetContext sets the context for the execution frame.
87func (f *ExecutionFrame) SetContext(ctx context.Context, interruptCheckFrequency uint) error {

Callers 3

newExecutionFrameMethod · 0.92
mustNewExecutionFrameFunction · 0.85

Calls 2

GetMethod · 0.65
createMethod · 0.45

Tested by 2

mustNewExecutionFrameFunction · 0.68