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

Function AsyncBinding

cel/decls.go:365–367  ·  view source on GitHub ↗

AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context. The function should block until the result is available, and the framework manages goroutine and channel lifecycle. This follows the same pattern use

(fn functions.BlockingAsyncOp)

Source from the content-addressed store, hash-verified

363// AsyncMaxConcurrency) until it returns on its own. For functions that may hang or that are not
364// under your control, wrap them with async.TimeoutBinding to bound their runtime.
365func AsyncBinding(fn functions.BlockingAsyncOp) OverloadOpt {
366 return decls.AsyncBinding(fn)
367}
368
369// SingletonAsyncBinding creates a singleton async function definition from a blocking function,
370// to be used with all function overloads. The provided function is called in its own goroutine

Calls 1

AsyncBindingFunction · 0.92