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

Struct Env

cel/env.go:138–169  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected