Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.gateway.server.instance

The running gateway instance: the state the server lifecycle writes and route handlers read, the gateway's stable identity, and client-lease liveness.

The running gateway instance: the state the server lifecycle writes and route
handlers read, the gateway's stable identity, and client-lease liveness.
raw docstring

CLIENT_LEASE_TTL_MSclj

How long a lease that carries NO pid may go without a single request before this daemon stops counting it as a client.

Only a remote client registers one - a phone, or a --gateway CLI on another machine - and its process lives where this daemon cannot look, so its own traffic is the entire proof it is still there (server/touch-client-lease!). Long enough that a human reading a screen between two requests keeps their lease, and an ATTACHED remote client is counted through its open SSE stream anyway (that one dies with its socket). Short enough that a client which vanished mid-flight stops pinning the daemon past an update.

How long a lease that carries NO pid may go without a single request before this
daemon stops counting it as a client.

Only a remote client registers one - a phone, or a `--gateway` CLI on another
machine - and its process lives where this daemon cannot look, so its own traffic
is the entire proof it is still there (`server/touch-client-lease!`). Long enough that
a human reading a screen between two requests keeps their lease, and an ATTACHED
remote client is counted through its open SSE stream anyway (that one dies with
its socket). Short enough that a client which vanished mid-flight stops pinning
the daemon past an update.
sourceraw docstring

gateway-instance-idclj

(gateway-instance-id db host port)

Stable, opaque identity for THIS gateway's data store, derived from the db target. Deterministic across restarts and independent of the bind host (loopback vs LAN vs Tailscale / cloudflared), so a shared session link resolves to the SAME gateway no matter which URL a client reached it on. Distinct data stores (distinct machines/homes) get distinct ids. Opaque and non-secret: it only names which gateway, never grants access.

Stable, opaque identity for THIS gateway's data store, derived from the db
target. Deterministic across restarts and independent of the bind host
(loopback vs LAN vs Tailscale / cloudflared), so a shared session link
resolves to the SAME gateway no matter which URL a client reached it on.
Distinct data stores (distinct machines/homes) get distinct ids. Opaque and
non-secret: it only names *which* gateway, never grants access.
sourceraw docstring

live-client?clj

(live-client? client-id)
source

server-stateclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close