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

Function findInBucket

interpreter/async.go:207–214  ·  view source on GitHub ↗

findInBucket returns the call state in the bucket matching the same node id and call identity, or nil if no match is present.

(bucket []*asyncCallState, id int64, function, overload string, args []ref.Val)

Source from the content-addressed store, hash-verified

205// findInBucket returns the call state in the bucket matching the same node id and call identity,
206// or nil if no match is present.
207func findInBucket(bucket []*asyncCallState, id int64, function, overload string, args []ref.Val) *asyncCallState {
208 for _, acs := range bucket {
209 if acs.matches(id, function, overload, args) {
210 return acs
211 }
212 }
213 return nil
214}
215
216// getOrCreate returns the existing call state for the (node id, args) tuple, or registers and
217// returns a new one. A newly registered call is assigned a unique callID and counted as pending.

Callers 1

getOrCreateMethod · 0.85

Calls 1

matchesMethod · 0.80

Tested by

no test coverage detected