@rebasepro/types 0.34.0 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types/backend.d.ts
CHANGED
|
@@ -395,6 +395,38 @@ export interface RealtimeCounts {
|
|
|
395
395
|
busFramesPublished: Record<string, number>;
|
|
396
396
|
/** Broadcasts and presence changes not published because no other instance had members. */
|
|
397
397
|
busFramesSkipped: number;
|
|
398
|
+
/** What this process's sockets did since it started. Absent on a provider that does not count them. */
|
|
399
|
+
socketTotals?: RealtimeSocketTotals;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Running totals of what one process's sockets did, for `/metrics`.
|
|
403
|
+
* @group Backend
|
|
404
|
+
*/
|
|
405
|
+
export interface RealtimeSocketTotals {
|
|
406
|
+
/** Sockets opened. */
|
|
407
|
+
opened: number;
|
|
408
|
+
/**
|
|
409
|
+
* Sockets closed, by who ended them: `client`, `client_watchdog`,
|
|
410
|
+
* `network`, `no_pong`, `backlog`, `session`, `ceiling`, `shutdown`,
|
|
411
|
+
* `oversized_frame`, `server`.
|
|
412
|
+
*/
|
|
413
|
+
closedBy: Record<string, number>;
|
|
414
|
+
/** Sockets closed, by close code (`other` for an application code Rebase does not use). */
|
|
415
|
+
closeCodes: Record<string, number>;
|
|
416
|
+
/** Frames received. */
|
|
417
|
+
framesIn: number;
|
|
418
|
+
/** Bytes of the frames received. */
|
|
419
|
+
bytesIn: number;
|
|
420
|
+
/** Frames the realtime service pushed: broadcasts, presence and subscription updates. */
|
|
421
|
+
framesOut: number;
|
|
422
|
+
/** Bytes of the frames pushed. */
|
|
423
|
+
bytesOut: number;
|
|
424
|
+
/**
|
|
425
|
+
* Frames refused, by code: `RATE_LIMITED`, `CHANNEL_FORBIDDEN`,
|
|
426
|
+
* `CHANNEL_BUS_PAYLOAD_TOO_LARGE`, `FRAME_TOO_LARGE`, `AUTH_UNAVAILABLE`
|
|
427
|
+
* (the identity could not be re-checked), `UNAUTHORIZED`.
|
|
428
|
+
*/
|
|
429
|
+
refused: Record<string, number>;
|
|
398
430
|
}
|
|
399
431
|
/**
|
|
400
432
|
* The table registry a data driver builds for itself and returns on
|
|
@@ -168,12 +168,12 @@ export type ChannelBusConfig =
|
|
|
168
168
|
/**
|
|
169
169
|
* Postgres LISTEN/NOTIFY, reusing infrastructure the deployment already has.
|
|
170
170
|
*
|
|
171
|
-
* `pg_notify` caps a payload at 8000 bytes
|
|
172
|
-
* is delivered cross-instance only on a *retained* channel, where the
|
|
171
|
+
* `pg_notify` caps a payload at 8000 bytes. On a *retained* channel the
|
|
173
172
|
* notification carries a pointer (`seq`) instead of the message and each
|
|
174
|
-
* receiver reads the body back from `rebase.channel_messages`.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
173
|
+
* receiver reads the body back from `rebase.channel_messages`. On an
|
|
174
|
+
* ephemeral channel a broadcast over the cap travels in parts, sent
|
|
175
|
+
* together in one statement and put back together by each receiver, up to
|
|
176
|
+
* 1 MiB; only a larger one is refused to its sender.
|
|
177
177
|
*
|
|
178
178
|
* NOTE: `LISTEN` needs a session-mode connection. Behind PgBouncer in
|
|
179
179
|
* transaction mode this must point at the database directly
|