MCPcopy
hub / github.com/kubernetes-sigs/kwok / Contains

Method Contains

pkg/utils/cel/resource_list.go:91–98  ·  view source on GitHub ↗

Contains implements the traits.Container interface.

(index ref.Val)

Source from the content-addressed store, hash-verified

89
90// Contains implements the traits.Container interface.
91func (r ResourceList) Contains(index ref.Val) ref.Val {
92 key, ok := index.(types.String)
93 if !ok {
94 return types.MaybeNoSuchOverloadErr(index)
95 }
96 _, found := r.List[corev1.ResourceName(key)]
97 return types.Bool(found)
98}
99
100// Get implements the traits.Indexer interface.
101func (r ResourceList) Get(index ref.Val) ref.Val {

Callers 15

isSupportedFileExtensionFunction · 0.80
verifyBoilerplateFunction · 0.80
TestPodControllerFunction · 0.80
PutMethod · 0.80
UseMethod · 0.80
runEFunction · 0.80
checkConfigOrCRDFunction · 0.80
findContainerInExecsFunction · 0.80
findPortInForwardsFunction · 0.80
findUsageInUsagesFunction · 0.80
prometheusDiscoveryMethod · 0.80
findLogInLogsFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestPodControllerFunction · 0.64