- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewMapValue (0.12 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy_test.go
"k8s.io/apiserver/pkg/cel/environment" ) func TestLazyMapType(t *testing.T) { env, variablesType, err := buildTestEnv() if err != nil { t.Fatal(err) } variablesMap := NewMapValue(variablesType) activation := &testActivation{variables: variablesMap} // add foo as a string variablesType.Fields["foo"] = apiservercel.NewDeclField("foo", apiservercel.StringType, true, nil, nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 4.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy.go
// callbacks are a map of field name to the function that returns the field Val callbacks map[string]GetFieldFunc // knownValues are registered names, used for iteration knownValues []string } func NewMapValue(objectType ref.Type) *MapValue { return &MapValue{ typeValue: types.NewTypeValue(objectType.TypeName(), traits.IndexerType|traits.FieldTesterType|traits.IterableType), values: map[string]ref.Val{},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 23 21:31:27 UTC 2023 - 4.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/composition.go
} type compositionContext struct { context.Context compositionEnv *CompositionEnv accumulatedCost int64 } func (c *compositionContext) Variables(activation any) ref.Val { lazyMap := lazy.NewMapValue(c.compositionEnv.MapType) for name, result := range c.compositionEnv.CompiledVariables { accessor := &variableAccessor{ name: name, result: result, activation: activation, context: c,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 13 21:06:39 UTC 2024 - 7.4K bytes - Viewed (0)