Rename Installation to Instance
Follows the portal: the noun is "instance" everywhere the app says it — UI strings, CLI output, error details, docs and comments. The wire keys (`instance_id`, `instance_token`) and the hub route this calls move with it. An existing cloud.json is adopted rather than refused: without the key alias the dataclass fails to parse, which the caller swallows and reads as "never enrolled" instead of "reconnect". `instance_key` on a node type becomes `target_key`. It means the outside thing a node points at, which is a different sense of the word, and keeping both would put two meanings of "instance" in one codebase.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Whether the installation this page talks to is reachable right now.
|
||||
* Whether the instance this page talks to is reachable right now.
|
||||
*
|
||||
* Transport state, kept apart from `liveStore` on purpose: that one holds what
|
||||
* the engine is doing, this one holds whether we can hear it at all. Only
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
type Connection = {
|
||||
offline: boolean
|
||||
/** When the portal last heard from the installation, epoch ms. */
|
||||
/** When the portal last heard from the instance, epoch ms. */
|
||||
lastSeen: number | null
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ function emit(next: Connection) {
|
||||
|
||||
export const connectionStore = {
|
||||
setOffline(lastSeen: string | number | null) {
|
||||
// The socket is up, so the installation is reachable: this was one bad
|
||||
// The socket is up, so the instance is reachable: this was one bad
|
||||
// answer rather than a lost tunnel, and the banner would have nothing to
|
||||
// take it back down again.
|
||||
if (socketOpen) return
|
||||
@@ -56,7 +56,7 @@ export const connectionStore = {
|
||||
/**
|
||||
* The live socket opened or closed.
|
||||
*
|
||||
* An open socket is proof the installation can be heard, so it also clears
|
||||
* An open socket is proof the instance can be heard, so it also clears
|
||||
* the banner — and since the socket reconnects on its own, that is the one
|
||||
* release the offline state can always count on.
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ export const connectionStore = {
|
||||
/**
|
||||
* The proxy's offline answer: a 503 carrying `{offline, last_seen}`.
|
||||
*
|
||||
* Told apart from every other 503 by that body, so an installation that is
|
||||
* Told apart from every other 503 by that body, so an instance that is
|
||||
* merely busy is not reported as unreachable.
|
||||
*/
|
||||
export function offlineDetail(
|
||||
|
||||
Reference in New Issue
Block a user