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

Function NewExecutionFrame

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

NewExecutionFrame creates a new execution frame from the pool.

(input any)

Source from the content-addressed store, hash-verified

82
83// NewExecutionFrame creates a new execution frame from the pool.
84func NewExecutionFrame(input any) (*ExecutionFrame, error) {
85 f := frameStack.Get().(*ExecutionFrame)
86 switch v := input.(type) {
87 case Activation:
88 f.Activation = v
89 case map[string]any:
90 f.Activation = activationInput.create(v)
91 default:
92 return nil, fmt.Errorf("invalid input, wanted Activation or map[string]any, got: (%T)%v", input, input)
93 }
94 return f, nil
95}
96
97// SetContext sets the context for the execution frame.
98func (f *ExecutionFrame) SetContext(ctx context.Context, interruptCheckFrequency uint) error {

Calls 2

GetMethod · 0.65
createMethod · 0.45