client
api.Backend over the service’s socket. Source: pkg/client.
pkg/client is a workspace held by the service, reached over its Unix socket with Connect. Attach opens the workspace in the service and returns a *Remote that front ends drive exactly as they drive a local *engine.Workspace.
- Turns stream
RunTurnevents and convert them toapi.Events; approval and question events are answered through the approver the front end set. - Service errors (
ErrorInforeasons) map back topkg/api’s sentinel and typed errors, soerrors.Ismatches. Closeleaves the workspace open in the service for other clients. Background processes belong to the service and survive the client.AttachWorkersdoes the same for the CLI’s worker commands overWorkerService.
| Name | |
|---|---|
Attach(ctx, socket, dir, warn) |
A *Remote for the workspace in dir |
AttachHTTP |
The same over any HTTP client (tests) |
AttachWorkers |
The workspace’s workers, over WorkerService |
apps/cli.
Spec: client.