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

Function SingletonAsyncBinding

cel/decls.go:375–377  ·  view source on GitHub ↗

SingletonAsyncBinding creates a singleton async function definition from a blocking function, to be used with all function overloads. The provided function is called in its own goroutine with the provided context. Note, this approach works well if operand is expected to have a specific trait which

(fn functions.BlockingAsyncOp, traits ...int)

Source from the content-addressed store, hash-verified

373// Note, this approach works well if operand is expected to have a specific trait which it implements,
374// e.g. traits.ContainerType. Otherwise, prefer per-overload async bindings.
375func SingletonAsyncBinding(fn functions.BlockingAsyncOp, traits ...int) FunctionOpt {
376 return decls.SingletonAsyncBinding(fn, traits...)
377}
378
379// OverloadIsNonStrict enables the function to be called with error and unknown argument values.
380//

Callers

nothing calls this directly

Calls 1

SingletonAsyncBindingFunction · 0.92

Tested by

no test coverage detected