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

Function SingletonAsyncBinding

cel/decls.go:378–380  ·  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

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

Callers

nothing calls this directly

Calls 1

SingletonAsyncBindingFunction · 0.92

Tested by

no test coverage detected