mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
fixes #10531 Adds a check for `version` on connection to the Agent API websocket endpoint. This is primarily for future-proofing, so that up-level agents get a sensible error if they connect to a back-level Coderd. It also refactors the location of the `CurrentVersion` variables, to be part of the `proto` packages, since the versions refer to the APIs defined therein.
11 lines
301 B
Go
11 lines
301 B
Go
package proto
|
|
|
|
import (
|
|
"github.com/coder/coder/v2/tailnet/proto"
|
|
)
|
|
|
|
// CurrentVersion is the current version of the agent API. It is tied to the
|
|
// tailnet API version to avoid confusion, since agents connect to the tailnet
|
|
// API over the same websocket.
|
|
var CurrentVersion = proto.CurrentVersion
|