nemo-relay-worker

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

Rust SDK for NeMo Relay out-of-process gRPC worker plugins.

Invocation cancellation

The grpc-v1 service tracks active unary and streaming callbacks by the host-provided invocation ID. Relay sends CancelInvocation when a managed caller is cancelled, an invocation times out, or a host stream is abandoned. The SDK aborts the matching async callback task and reports worker.cancelled; cancellation of an unknown, completed, or already cancelled ID returns a negative acknowledgment.

Cancellation is cooperative. Dropping an async callback future releases its Rust-owned resources, but an accepted acknowledgment does not prove that arbitrary blocking work started by the callback has stopped.

Structs

Enums

  • DiagnosticLevel: Diagnostic severity returned by plugin validation.
  • Event: Tagged union covering the two ATOF event kinds emitted by the runtime.
  • ScopeType: Semantic category attached to a scope lifecycle span.
  • WorkerSdkError: Error returned by worker SDK callbacks and runtime helpers.

Traits

  • WorkerPlugin: Trait implemented by Rust out-of-process worker plugins.

Functions

  • serve_plugin: Serves a worker plugin using environment variables supplied by the Relay host.
  • serve_plugin_arc: Serves a shared worker plugin using environment variables supplied by the Relay host.
  • serve_plugin_arc_with_config: Serves a shared worker plugin using explicit endpoint and authentication configuration.

Type Aliases

  • BoxFutureResult: Boxed future returned by async worker callbacks.
  • Json: Type alias for serde_json::Value, used as the universal JSON representation throughout NeMo Relay APIs.
  • JsonStream: Boxed JSON stream returned by streaming worker callbacks.
  • Result: SDK result type.