feat: use agent v2 API to post startup (#11877)

Uses the v2 Agent API to post startup information.
This commit is contained in:
Spike Curtis
2024-01-30 11:23:28 +04:00
committed by GitHub
parent da8bb1c198
commit 2599850e54
11 changed files with 101 additions and 71 deletions
+1
View File
@@ -154,6 +154,7 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
Auth: tailnet.AgentTunnelAuth{},
}
ctx = tailnet.WithStreamID(ctx, streamID)
ctx = agentapi.WithAPIVersion(ctx, version)
err = agentAPI.Serve(ctx, mux)
if err != nil {
api.Logger.Warn(ctx, "workspace agent RPC listen error", slog.Error(err))