Skip to content

lib/callback

import "github.com/eugenioenko/goalchemy/lib/callback"

Package callback declares a bounded asynchronous host callback capability.

Function c csharp go java python rust swift typescript
Request yes yes yes yes yes yes yes yes
func Request(ctx context.Context, name string, request []byte) ([]byte, error)

Send request bytes to the host callback registered under name and wait for its reply.

  • Gate: cooperative (may suspend the calling task)
  • Determinism: nondeterministic
  • Bounds: Name length 1..128 bytes; requests and replies <=1MiB.
  • Errors: Provider rejection, canceled/deadline context and bounds return nil reply/error.
  • Contract: lib.callback.request 1.0.0