Directories
¶
| Path | Synopsis |
|---|---|
|
Package drain is the blue/green handover actor every game shares.
|
Package drain is the blue/green handover actor every game shares. |
|
internal
|
|
|
fakegame
Package fakegame is the smallest game the core's tests drive: players move a counter by their input's D, a snapshot of every counter goes out every second tick, and a "color" message changes the room summary.
|
Package fakegame is the smallest game the core's tests drive: players move a counter by their input's D, a snapshot of every counter goes out every second tick, and a "color" message changes the room summary. |
|
fakekit
Package fakekit plugs core/internal/fakegame into the server.
|
Package fakekit plugs core/internal/fakegame into the server. |
|
tsconst
Package tsconst reads constants out of the TypeScript client core, so a Go test can pin a Go constant to its TS twin: a drift on either side fails the build's tests instead of the wire.
|
Package tsconst reads constants out of the TypeScript client core, so a Go test can pin a Go constant to its TS twin: a drift on either side fails the build's tests instead of the wire. |
|
Package ledger keeps per-key records on disk without a database: an append-only JSON-lines journal and a periodic snapshot, owned by one goroutine.
|
Package ledger keeps per-key records on disk without a database: an append-only JSON-lines journal and a periodic snapshot, owned by one goroutine. |
|
Package limit holds the small rate and concurrency limiters the server uses against floods: a token bucket, a per-key bucket table with bounded memory, and a per-key connection gate.
|
Package limit holds the small rate and concurrency limiters the server uses against floods: a token bucket, a per-key bucket table with bounded memory, and a per-key connection gate. |
|
Package loadtest is a game-agnostic WebSocket load-test harness: slots and ramp, histograms, per-second rates, disconnect reasons and the player loop (player.go).
|
Package loadtest is a game-agnostic WebSocket load-test harness: slots and ramp, histograms, per-second rates, disconnect reasons and the player loop (player.go). |
|
Package lobby creates rooms under short join codes and forgets them when they finish.
|
Package lobby creates rooms under short join codes and forgets them when they finish. |
|
Package metrics is a dependency-free Prometheus text exposition: lock-free counters, gauges and fixed-bucket histograms, owned by one Registry that main builds and passes down (no globals).
|
Package metrics is a dependency-free Prometheus text exposition: lock-free counters, gauges and fixed-bucket histograms, owned by one Registry that main builds and passes down (no globals). |
|
Package netproto is the part of the wire protocol every game shares: the message envelope, the core message types (handshake, ping, chat, errors, notices), the welcome envelope and the core error codes.
|
Package netproto is the part of the wire protocol every game shares: the message envelope, the core message types (handshake, ping, chat, errors, notices), the welcome envelope and the core error codes. |
|
Package pilot issues and checks the anonymous pilot token.
|
Package pilot issues and checks the anonymous pilot token. |
|
Package room runs one match as an actor: a single goroutine owns the game and talks to connections only through channels and Sender.
|
Package room runs one match as an actor: a single goroutine owns the game and talks to connections only through channels and Sender. |
|
Package server wires HTTP routes and the WebSocket handshake to the lobby.
|
Package server wires HTTP routes and the WebSocket handshake to the lobby. |
|
Package wsconn wraps a WebSocket with a bounded, non-blocking outbound queue and a reader goroutine, so a room actor never blocks on a socket.
|
Package wsconn wraps a WebSocket with a bounded, non-blocking outbound queue and a reader goroutine, so a room actor never blocks on a socket. |
Click to show internal directories.
Click to hide internal directories.