Files
OpenShell/sdk
Divesh cc9995438f feat(sdk): route Go SDK exec and forward to the sandbox owner replica (#4852)
* feat(sdk): route Go SDK exec and forward to the sandbox owner replica

The Go SDK now does what the CLI already does for long-lived sandbox
calls. The GetSandbox check that Exec.Run, Exec.Stream, Exec.Interactive,
TCP.Forward and SSH.Tunnel already make also asks the gateway for the
owner replica. The call then sends it in the x-openshell-replica header
and retries once without the header when the edge proxy reports that the
owner's route has no ready endpoints.

No extra round trip is added. Without a reported owner the calls are
unchanged.

Part of #4223

Signed-off-by: divesh <dgude@nvidia.com>

* refactor(sdk): address Go replica routing review

Share the header check between the routed attempt and its retry, keep the
first-frame EOF rule in one bidi helper, reuse Get's request for the owner
lookup, and document the header contract next to the replica routing docs.

Part of #4223

Signed-off-by: divesh <dgude@nvidia.com>

* docs(kubernetes): refer to the SDKs collectively in replica routing

Part of #4223

Signed-off-by: divesh <dgude@nvidia.com>

---------

Signed-off-by: divesh <dgude@nvidia.com>
2026-10-29 17:18:41 +00:00
..