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

Struct Env

cel/env.go:134–165  ·  view source on GitHub ↗

Env encapsulates the context necessary to perform parsing, type checking, or generation of evaluable programs for different expressions.

Source from the content-addressed store, hash-verified

132// Env encapsulates the context necessary to perform parsing, type checking, or generation of
133// evaluable programs for different expressions.
134type Env struct {
135 Container *containers.Container
136 variables []*decls.VariableDecl
137 functions map[string]*decls.FunctionDecl
138 macros []Macro
139 contextProto protoreflect.MessageDescriptor
140 adapter types.Adapter
141 provider types.Provider
142 features map[int]bool
143 appliedFeatures map[int]bool
144 limits map[limitID]int
145 libraries map[string]SingletonLibrary
146 validators []ASTValidator
147 costOptions []checker.CostOption
148
149 funcBindOnce sync.Once
150 functionBindings []*functions.Overload
151
152 // Internal parser representation
153 prsr *parser.Parser
154 prsrOpts []parser.Option
155
156 // Internal checker representation
157 chkMutex sync.Mutex
158 chk *checker.Env
159 chkErr error
160 chkOnce sync.Once
161 chkOpts []checker.Option
162
163 // Program options tied to the environment
164 progOpts []ProgramOption
165}
166
167// ToConfig produces a YAML-serializable env.Config object from the given environment.
168//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected