- Notifications
You must be signed in to change notification settings - Fork914
Description
Today, tailnet clients connect to exactly one workspace Agent known at start of day. In order to support a desktop native VPN to Coder workspaces, we need a new tailnet RPC that delivers a stream of updates about workspaces being created, started, stopped and deleted, so that the native RPC can automatically connect to available agents.
The RPC will be part of the Tailnet API, and adds the following messages and RPC calls:
messageWorkspaceUpdatesRequest {}messageWorkspaceUpdate {repeatedWorkspaceupserted_workspaces=1;repeatedAgentupserted_agents=2;repeatedWorkspacedeleted_workspaces=3;repeatedAgentdeleted_agents=4;}messageWorkspace {bytesid=1;// UUIDstringname=2;enumStatus {UNKNOWN=0;PENDING=1;STARTING=2;RUNNING=3;STOPPING=4;STOPPED=5;FAILED=6;CANCELING=7;CANCELED=8;DELETING=9;DELETED=10;}Statusstatus=3;}messageAgent {bytesid=1;// UUIDstringname=2;bytesworkspace_id=3;// UUID}serviceTailnet {rpcWorkspaceUpdates(WorkspaceUpdatesRequest)returns (streamWorkspaceUpdate);}
Because the RPC is not tied to a specific agent, it willnot be available on the existingapi/v2/workspaceagents/<agent>/coordinate
HTTP endpoint, and needs to be added to a newapi/v2/users/me/tailnet
endpoint.