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

Method CompileOptions

ext/sets.go:106–124  ·  view source on GitHub ↗

CompileOptions implements the Library interface method.

()

Source from the content-addressed store, hash-verified

104
105// CompileOptions implements the Library interface method.
106func (setsLib) CompileOptions() []cel.EnvOption {
107 listType := cel.ListType(cel.TypeParamType("T"))
108 return []cel.EnvOption{
109 cel.Function("sets.contains",
110 cel.Overload("list_sets_contains_list", []*cel.Type{listType, listType}, cel.BoolType,
111 cel.BinaryBinding(setsContains))),
112 cel.Function("sets.equivalent",
113 cel.Overload("list_sets_equivalent_list", []*cel.Type{listType, listType}, cel.BoolType,
114 cel.BinaryBinding(setsEquivalent))),
115 cel.Function("sets.intersects",
116 cel.Overload("list_sets_intersects_list", []*cel.Type{listType, listType}, cel.BoolType,
117 cel.BinaryBinding(setsIntersects))),
118 cel.CostModel(
119 setsCostModel("list_sets_contains_list", 1),
120 setsCostModel("list_sets_equivalent_list", 2),
121 setsCostModel("list_sets_intersects_list", 1),
122 ),
123 }
124}
125
126// ProgramOptions implements the Library interface method.
127func (setsLib) ProgramOptions() []cel.ProgramOption {

Callers

nothing calls this directly

Calls 5

FunctionFunction · 0.92
OverloadFunction · 0.92
BinaryBindingFunction · 0.92
CostModelFunction · 0.92
setsCostModelFunction · 0.85

Tested by

no test coverage detected