@caprid/relay 0.0.0 → 0.1.1
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/LICENSE +202 -0
- package/README.md +160 -1
- package/dist/connect-session.d.ts +125 -0
- package/dist/connect-session.d.ts.map +1 -0
- package/dist/connect-session.js +300 -0
- package/dist/connect-session.js.map +1 -0
- package/dist/connect.d.ts +143 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +129 -0
- package/dist/connect.js.map +1 -0
- package/dist/delivery-timeouts.d.ts +37 -0
- package/dist/delivery-timeouts.d.ts.map +1 -0
- package/dist/delivery-timeouts.js +48 -0
- package/dist/delivery-timeouts.js.map +1 -0
- package/dist/document-service.d.ts +58 -0
- package/dist/document-service.d.ts.map +1 -0
- package/dist/document-service.js +166 -0
- package/dist/document-service.js.map +1 -0
- package/dist/errors.d.ts +71 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +99 -0
- package/dist/errors.js.map +1 -0
- package/dist/frame-reader.d.ts +81 -0
- package/dist/frame-reader.d.ts.map +1 -0
- package/dist/frame-reader.js +110 -0
- package/dist/frame-reader.js.map +1 -0
- package/dist/frame-writer.d.ts +109 -0
- package/dist/frame-writer.d.ts.map +1 -0
- package/dist/frame-writer.js +409 -0
- package/dist/frame-writer.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/media-track-properties.d.ts +59 -0
- package/dist/media-track-properties.d.ts.map +1 -0
- package/dist/media-track-properties.js +120 -0
- package/dist/media-track-properties.js.map +1 -0
- package/dist/media.d.ts +28 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +28 -0
- package/dist/media.js.map +1 -0
- package/dist/namespace-events.d.ts +44 -0
- package/dist/namespace-events.d.ts.map +1 -0
- package/dist/namespace-events.js +107 -0
- package/dist/namespace-events.js.map +1 -0
- package/dist/node.d.ts +75 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +114 -0
- package/dist/node.js.map +1 -0
- package/dist/payload.d.ts +8 -0
- package/dist/payload.d.ts.map +1 -0
- package/dist/payload.js +23 -0
- package/dist/payload.js.map +1 -0
- package/dist/publish.d.ts +209 -0
- package/dist/publish.d.ts.map +1 -0
- package/dist/publish.js +123 -0
- package/dist/publish.js.map +1 -0
- package/dist/room-endpoint.d.ts +21 -0
- package/dist/room-endpoint.d.ts.map +1 -0
- package/dist/room-endpoint.js +47 -0
- package/dist/room-endpoint.js.map +1 -0
- package/dist/send-order.d.ts +14 -0
- package/dist/send-order.d.ts.map +1 -0
- package/dist/send-order.js +11 -0
- package/dist/send-order.js.map +1 -0
- package/dist/settling-groups.d.ts +35 -0
- package/dist/settling-groups.d.ts.map +1 -0
- package/dist/settling-groups.js +73 -0
- package/dist/settling-groups.js.map +1 -0
- package/dist/subscription-events.d.ts +51 -0
- package/dist/subscription-events.d.ts.map +1 -0
- package/dist/subscription-events.js +125 -0
- package/dist/subscription-events.js.map +1 -0
- package/dist/subscription.d.ts +207 -0
- package/dist/subscription.d.ts.map +1 -0
- package/dist/subscription.js +283 -0
- package/dist/subscription.js.map +1 -0
- package/dist/supervised-publisher.d.ts +92 -0
- package/dist/supervised-publisher.d.ts.map +1 -0
- package/dist/supervised-publisher.js +839 -0
- package/dist/supervised-publisher.js.map +1 -0
- package/dist/supervised-subscriber.d.ts +201 -0
- package/dist/supervised-subscriber.d.ts.map +1 -0
- package/dist/supervised-subscriber.js +1420 -0
- package/dist/supervised-subscriber.js.map +1 -0
- package/dist/supervision.d.ts +78 -0
- package/dist/supervision.d.ts.map +1 -0
- package/dist/supervision.js +149 -0
- package/dist/supervision.js.map +1 -0
- package/dist/switchable.d.ts +164 -0
- package/dist/switchable.d.ts.map +1 -0
- package/dist/switchable.js +327 -0
- package/dist/switchable.js.map +1 -0
- package/dist/validation.d.ts +64 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +137 -0
- package/dist/validation.js.map +1 -0
- package/dist/write-slot.d.ts +87 -0
- package/dist/write-slot.d.ts.map +1 -0
- package/dist/write-slot.js +519 -0
- package/dist/write-slot.js.map +1 -0
- package/package.json +82 -4
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The application's subscription (see CONTEXT.md): one SUBSCRIBE request from creation to its
|
|
3
|
+
* terminal state, as distinct from demand, the relay's own subscription to a publisher.
|
|
4
|
+
*
|
|
5
|
+
* The module owns the core handle, the connection's closure observation and the terminal state, and
|
|
6
|
+
* translates the core's callbacks into product events once. Its consumers are the callback form
|
|
7
|
+
* (`RelaySubscriber.subscribe` with handlers) and the bounded events iterator; both attach through
|
|
8
|
+
* {@link SubscriptionConsumer} and see the same events and the same ending. Its public face is
|
|
9
|
+
* {@link RelaySubscription}: the core handle plus `subscribed` and `ended`, the readiness and
|
|
10
|
+
* termination awaitables. The pre-acceptance `update()` queue lives here too.
|
|
11
|
+
*/
|
|
12
|
+
import { encodeRequestUpdate, isStreamFailure, REQUEST_ERROR_CODE, } from '@caprid/moq-core';
|
|
13
|
+
import { RelayError } from './errors.js';
|
|
14
|
+
/**
|
|
15
|
+
* How long a pre-acceptance stream failure waits for the transport to report closure before it is
|
|
16
|
+
* recorded as a rejection. Chromium reports closure well under a millisecond after it fails the
|
|
17
|
+
* stream (issue #102); this only bounds the wait on a connection that stays up.
|
|
18
|
+
*/
|
|
19
|
+
export const CLOSURE_GRACE_MS = 250;
|
|
20
|
+
/**
|
|
21
|
+
* An events iterator's queue was full when another event arrived. Code `SUBSCRIPTION_OVERFLOW`, phase
|
|
22
|
+
* `subscription`. The iterator discards its queue and cancels its subscription; it does not drop the
|
|
23
|
+
* event and continue.
|
|
24
|
+
*/
|
|
25
|
+
export class SubscriptionOverflowError extends RelayError {
|
|
26
|
+
/** `'SubscriptionOverflowError'`. */
|
|
27
|
+
name = 'SubscriptionOverflowError';
|
|
28
|
+
constructor() {
|
|
29
|
+
super('SUBSCRIPTION_OVERFLOW', 'Subscription event buffer overflow', 'subscription');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The relay answered the subscription with REQUEST_ERROR, or the request timed out or failed before
|
|
34
|
+
* acceptance. Code `SUBSCRIPTION_REQUEST_FAILED`, phase `subscription`; `message` is the REQUEST_ERROR's reason phrase.
|
|
35
|
+
*/
|
|
36
|
+
export class SubscriptionRequestError extends RelayError {
|
|
37
|
+
/** `'SubscriptionRequestError'`. */
|
|
38
|
+
name = 'SubscriptionRequestError';
|
|
39
|
+
/** The MOQT REQUEST_ERROR as the callback form's `onError` receives it, with its numeric code. */
|
|
40
|
+
requestError;
|
|
41
|
+
/** @param requestError The REQUEST_ERROR to wrap. */
|
|
42
|
+
constructor(requestError) {
|
|
43
|
+
super('SUBSCRIPTION_REQUEST_FAILED', requestError.reason, 'subscription');
|
|
44
|
+
this.requestError = requestError;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The connection ended while the subscription was open, including a clean local close. Code `CLOSED`,
|
|
49
|
+
* phase `connection`; `cause` is the connection's failure when there was one. Never a claim that
|
|
50
|
+
* delivery drained.
|
|
51
|
+
*/
|
|
52
|
+
export class SubscriptionConnectionClosedError extends RelayError {
|
|
53
|
+
/** `'SubscriptionConnectionClosedError'`. */
|
|
54
|
+
name = 'SubscriptionConnectionClosedError';
|
|
55
|
+
/** @param cause The connection's failure, if any. */
|
|
56
|
+
constructor(cause) {
|
|
57
|
+
super('CLOSED', 'Connection closed; subscription delivery ended without a drain guarantee', 'connection', {
|
|
58
|
+
cause,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** The error `subscribed` rejects with for an ending that came before acceptance. */
|
|
63
|
+
export function endError(end) {
|
|
64
|
+
switch (end.cause) {
|
|
65
|
+
case 'request-error':
|
|
66
|
+
return new SubscriptionRequestError(end.error);
|
|
67
|
+
case 'connection-closed':
|
|
68
|
+
return new SubscriptionConnectionClosedError(end.error);
|
|
69
|
+
case 'cancelled':
|
|
70
|
+
// Any reason the caller gave stands, null included; only an omitted one gets the default.
|
|
71
|
+
return end.error === undefined
|
|
72
|
+
? new RelayError('CLOSED', 'Subscription was cancelled before the relay answered', 'subscription')
|
|
73
|
+
: end.error;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Snapshot one product callback and hold it to the synchronous callback policy: an async function
|
|
78
|
+
* is refused before any request is sent, and a returned promise is observed and diagnosed once,
|
|
79
|
+
* never awaited by delivery. Mirrors the core's own guard, which now only sees this module's lambdas.
|
|
80
|
+
*/
|
|
81
|
+
export function synchronousCallback(name, callback, receiver) {
|
|
82
|
+
if (Object.prototype.toString.call(callback) === '[object AsyncFunction]') {
|
|
83
|
+
throw new TypeError(`${name} must be synchronous; use Relay subscribeEvents() for async consumption`);
|
|
84
|
+
}
|
|
85
|
+
let reported = false;
|
|
86
|
+
return (...args) => {
|
|
87
|
+
const returned = Reflect.apply(callback, receiver, args);
|
|
88
|
+
if (returned &&
|
|
89
|
+
(typeof returned === 'object' || typeof returned === 'function') &&
|
|
90
|
+
'then' in returned &&
|
|
91
|
+
typeof returned.then === 'function') {
|
|
92
|
+
// JS promises cannot be cancelled. Observe failures without serializing delivery.
|
|
93
|
+
void Promise.resolve(returned).catch(() => { });
|
|
94
|
+
if (!reported) {
|
|
95
|
+
reported = true;
|
|
96
|
+
// biome-ignore lint/suspicious/noConsole: public diagnostic for unsupported async callbacks
|
|
97
|
+
console.error(new TypeError(`${name} returned a promise; callbacks must be synchronous; use Relay subscribeEvents()`));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* How many `update()` calls may wait for SUBSCRIBE_OK. REQUEST_UPDATE is legal only on an accepted
|
|
104
|
+
* subscription (draft-ietf-moq-transport-22 §3.1), so earlier updates queue here in order.
|
|
105
|
+
*/
|
|
106
|
+
export const UPDATE_QUEUE_BOUND = 8;
|
|
107
|
+
export function createSubscription(deps, initial = []) {
|
|
108
|
+
const consumers = new Set(initial);
|
|
109
|
+
let accepted = false;
|
|
110
|
+
let end;
|
|
111
|
+
let core;
|
|
112
|
+
let removeClosed = () => { };
|
|
113
|
+
let cancelGrace = () => { };
|
|
114
|
+
const queuedUpdates = [];
|
|
115
|
+
let resolveSubscribed;
|
|
116
|
+
let rejectSubscribed;
|
|
117
|
+
let resolveEnded;
|
|
118
|
+
const subscribed = new Promise((resolve, reject) => {
|
|
119
|
+
resolveSubscribed = resolve;
|
|
120
|
+
rejectSubscribed = reject;
|
|
121
|
+
});
|
|
122
|
+
// Nobody may await readiness; a rejection must not surface as an unhandled rejection.
|
|
123
|
+
void subscribed.catch(() => { });
|
|
124
|
+
const ended = new Promise((resolve) => {
|
|
125
|
+
resolveEnded = resolve;
|
|
126
|
+
});
|
|
127
|
+
const finish = (next) => {
|
|
128
|
+
if (end)
|
|
129
|
+
return;
|
|
130
|
+
end = next;
|
|
131
|
+
queuedUpdates.length = 0;
|
|
132
|
+
removeClosed();
|
|
133
|
+
cancelGrace();
|
|
134
|
+
if (!accepted)
|
|
135
|
+
rejectSubscribed(endError(next));
|
|
136
|
+
resolveEnded(next);
|
|
137
|
+
// Every ending cancels the core handle: after a REQUEST_ERROR or closure the core has already
|
|
138
|
+
// dropped the request, and cancelling then is harmless; after a local cancel it is the point.
|
|
139
|
+
core?.cancel(next.error);
|
|
140
|
+
const consumersToTell = [...consumers];
|
|
141
|
+
consumers.clear();
|
|
142
|
+
for (const consumer of consumersToTell)
|
|
143
|
+
consumer.ended(next);
|
|
144
|
+
};
|
|
145
|
+
const failRequest = (error) => {
|
|
146
|
+
if (accepted) {
|
|
147
|
+
finish({ kind: 'terminated', cause: 'request-error', accepted: true, error });
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const reject = () => {
|
|
151
|
+
if (ending())
|
|
152
|
+
return;
|
|
153
|
+
try {
|
|
154
|
+
finish({ kind: 'rejected', cause: 'request-error', accepted: false, error });
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// Inside the core's request reader a throwing callback is caught and dropped. This runs
|
|
158
|
+
// outside it, so contain the throw the same way rather than let it escape the microtask.
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
// The core fails a pending request before it reports the closure that killed it, in the same
|
|
162
|
+
// turn. Hold the failure until the turn ends, so a closure that follows is the ending this
|
|
163
|
+
// subscription describes; a genuine rejection is recorded one microtask later.
|
|
164
|
+
if (!isStreamFailure(error) || error.errorCode === REQUEST_ERROR_CODE.TIMEOUT) {
|
|
165
|
+
queueMicrotask(reject);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
// A stream that failed without a REQUEST_ERROR may be the first sign of a lost transport: a
|
|
169
|
+
// browser can fail the stream tasks before `closed` settles. The session reports the closure
|
|
170
|
+
// from its own reaction to `closed`, through the observer this subscription already holds, so
|
|
171
|
+
// leave the ending to that unless the connection is still up once the grace has passed. Any
|
|
172
|
+
// ending clears the timer, so nothing outlives the subscription.
|
|
173
|
+
const grace = setTimeout(reject, CLOSURE_GRACE_MS);
|
|
174
|
+
cancelGrace = () => clearTimeout(grace);
|
|
175
|
+
};
|
|
176
|
+
const connectionClosed = (error) => finish({ kind: 'terminated', cause: 'connection-closed', accepted, error });
|
|
177
|
+
const cancelWith = (error) => finish({ kind: 'cancelled', cause: 'cancelled', accepted, error });
|
|
178
|
+
const deliver = (event) => {
|
|
179
|
+
if (end)
|
|
180
|
+
return;
|
|
181
|
+
if (event.type === 'subscribed') {
|
|
182
|
+
accepted = true;
|
|
183
|
+
resolveSubscribed(event.value);
|
|
184
|
+
// Now Established: the updates that waited go out in order, before consumers hear of it.
|
|
185
|
+
try {
|
|
186
|
+
for (const parameters of queuedUpdates.splice(0))
|
|
187
|
+
core?.update(parameters);
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
// Enqueue-time validation encoded each update with this request's id, so a throw here is
|
|
191
|
+
// a core fault. Letting it escape into the core's request reader would disable the
|
|
192
|
+
// subscription silently; end it loudly instead. Readiness settled first, so a caller
|
|
193
|
+
// awaiting it sees the acceptance and then this ending.
|
|
194
|
+
cancelWith(error);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
for (const consumer of [...consumers])
|
|
199
|
+
consumer.event(event);
|
|
200
|
+
};
|
|
201
|
+
/** Read through a call: the core's callbacks can end the subscription inside deps.subscribe(). */
|
|
202
|
+
const ending = () => end;
|
|
203
|
+
const handle = () => {
|
|
204
|
+
if (core)
|
|
205
|
+
return core;
|
|
206
|
+
const now = ending();
|
|
207
|
+
throw now?.error instanceof Error
|
|
208
|
+
? now.error
|
|
209
|
+
: new RelayError('CLOSED', 'Subscription ended before its request was sent', 'subscription');
|
|
210
|
+
};
|
|
211
|
+
removeClosed = deps.observeClosed(connectionClosed);
|
|
212
|
+
if (!end) {
|
|
213
|
+
try {
|
|
214
|
+
core = deps.subscribe({
|
|
215
|
+
onOk: (value) => deliver({ type: 'subscribed', value }),
|
|
216
|
+
onObject: (value) => deliver({ type: 'object', value }),
|
|
217
|
+
onDone: (value) => deliver({ type: 'publisherDone', value }),
|
|
218
|
+
onSubgroupEnd: (value) => deliver({ type: 'subgroupEnd', value }),
|
|
219
|
+
onSubgroupReset: (value) => deliver({ type: 'subgroupReset', value }),
|
|
220
|
+
onStateNotify: (value) => deliver({ type: 'stateNotify', value }),
|
|
221
|
+
onGoaway: (value) => deliver({ type: 'goaway', value }),
|
|
222
|
+
onUpdateOk: () => deliver({ type: 'updateOk', value: undefined }),
|
|
223
|
+
onError: failRequest,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
cancelWith(error);
|
|
228
|
+
throw error;
|
|
229
|
+
}
|
|
230
|
+
// A source may end the subscription synchronously during subscribe(), through a closure
|
|
231
|
+
// observer it invokes at once; the handle did not exist when the ending was recorded, so
|
|
232
|
+
// cancel it now. A request failure delivered that early is held until the turn ends and
|
|
233
|
+
// cancels the handle then.
|
|
234
|
+
const endedDuringSubscribe = ending();
|
|
235
|
+
if (endedDuringSubscribe)
|
|
236
|
+
core.cancel(endedDuringSubscribe.error);
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
subscribed,
|
|
240
|
+
ended,
|
|
241
|
+
get requestId() {
|
|
242
|
+
return handle().requestId;
|
|
243
|
+
},
|
|
244
|
+
update(parameters) {
|
|
245
|
+
if (ending()) {
|
|
246
|
+
throw new RelayError('CLOSED', 'Subscription has ended; open a new one to change what you receive', 'subscription');
|
|
247
|
+
}
|
|
248
|
+
if (accepted) {
|
|
249
|
+
handle().update(parameters);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (queuedUpdates.length >= UPDATE_QUEUE_BOUND) {
|
|
253
|
+
throw new RelayError('UPDATE_QUEUE_FULL', `More than ${UPDATE_QUEUE_BOUND} updates are waiting for the subscription to be accepted; await onSubscribed before updating again`, 'subscription');
|
|
254
|
+
}
|
|
255
|
+
// A malformed or oversize update must fail here, where the caller can see it, not during the
|
|
256
|
+
// flush on SUBSCRIBE_OK, so it is encoded exactly as the flush will encode it. The queue
|
|
257
|
+
// holds a snapshot, so later mutation of the caller's object cannot change what is sent, as
|
|
258
|
+
// an immediate send would have serialized it at once.
|
|
259
|
+
encodeRequestUpdate(handle().requestId, parameters, deps.protocol);
|
|
260
|
+
queuedUpdates.push(structuredClone(parameters));
|
|
261
|
+
},
|
|
262
|
+
cancel(reason) {
|
|
263
|
+
cancelWith(reason);
|
|
264
|
+
},
|
|
265
|
+
attach(consumer) {
|
|
266
|
+
if (end) {
|
|
267
|
+
consumer.ended(end);
|
|
268
|
+
return () => { };
|
|
269
|
+
}
|
|
270
|
+
consumers.add(consumer);
|
|
271
|
+
return () => {
|
|
272
|
+
consumers.delete(consumer);
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
get accepted() {
|
|
276
|
+
return accepted;
|
|
277
|
+
},
|
|
278
|
+
get end() {
|
|
279
|
+
return end;
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,mBAAmB,EAEnB,eAAe,EAKf,kBAAkB,GAKnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAsJzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAYpC;;;;GAIG;AACH,MAAM,OAAO,yBAA0B,SAAQ,UAAU;IACvD,qCAAqC;IACnB,IAAI,GAAG,2BAA2B,CAAC;IACrD;QACE,KAAK,CAAC,uBAAuB,EAAE,oCAAoC,EAAE,cAAc,CAAC,CAAC;IACvF,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IACtD,oCAAoC;IAClB,IAAI,GAAG,0BAA0B,CAAC;IACpD,kGAAkG;IACzF,YAAY,CAAe;IAEpC,qDAAqD;IACrD,YAAY,YAA0B;QACpC,KAAK,CAAC,6BAA6B,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAC1E,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,iCAAkC,SAAQ,UAAU;IAC/D,6CAA6C;IAC3B,IAAI,GAAG,mCAAmC,CAAC;IAC7D,qDAAqD;IACrD,YAAY,KAAe;QACzB,KAAK,CAAC,QAAQ,EAAE,0EAA0E,EAAE,YAAY,EAAE;YACxG,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF;AAED,qFAAqF;AACrF,MAAM,UAAU,QAAQ,CAAC,GAAoB;IAC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C,QAAQ;YACb,IAAI,GAAG,EAAE,CAAC;gBACR,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACpB,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;YAClB,CAAC;YACD,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,GAAG,EAAE;gBACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC;QACD,IAAI,QAAQ;YACV,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,IAAI,GAAG;YACL,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The supervised publisher: one publisher connection at a time, replaced with backoff whenever it ends, each serving
|
|
3
|
+
* the application's root namespace plus a fresh generation field. Track writers outlive the connections: the
|
|
4
|
+
* application registers a track once and keeps writing to the same writer, which binds to each generation's track in
|
|
5
|
+
* turn. Nothing written is replayed onto a new generation; a write made while no generation is up fails at once with
|
|
6
|
+
* `RECONNECTING`. See spec/behavior.md, "Supervised connections".
|
|
7
|
+
*/
|
|
8
|
+
import type { ConnectRelayOptions } from './connect-session.js';
|
|
9
|
+
import { type ConnectRelayPublisherOptions, type RegisterTrackOptions, type RelayPublisher, type RelayTrackWriter } from './publish.js';
|
|
10
|
+
import { type SupervisedStatus, type SupervisionBackoff } from './supervision.js';
|
|
11
|
+
/** Options for `connectSupervisedPublisher`: the shared connection options, the root namespace and the policy. */
|
|
12
|
+
export interface ConnectSupervisedPublisherOptions extends ConnectRelayOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The root namespace. Each connection serves the root followed by one generation field the SDK chooses, so the
|
|
15
|
+
* token must grant the root, not just one namespace under it.
|
|
16
|
+
*/
|
|
17
|
+
namespace: readonly string[];
|
|
18
|
+
/** Backoff between connection attempts. Default from 500 ms, doubling up to 10 s, with jitter. */
|
|
19
|
+
reconnect?: SupervisionBackoff;
|
|
20
|
+
/**
|
|
21
|
+
* How long before the connection's credential expires (`RelayPublisher.expiresAt`) the next generation is brought
|
|
22
|
+
* up to replace it, make-before-break. Default 60 seconds; never earlier than halfway through the time left.
|
|
23
|
+
*/
|
|
24
|
+
rotateBeforeMs?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Called once each generation's connection is up and every registered track is bound to it. On a rotation, once
|
|
27
|
+
* the next generation is up and every track is registered on it; each track moves to it as described in `rotate()`. A throw stops the
|
|
28
|
+
* supervisor with that error, as `onStatus` does.
|
|
29
|
+
*/
|
|
30
|
+
onGeneration?(info: PublisherGeneration): void;
|
|
31
|
+
/**
|
|
32
|
+
* Called on every status change; `error` is what ended the previous connection or failed the last attempt. A throw
|
|
33
|
+
* stops the supervisor with that error: a pending `connectSupervisedPublisher` rejects with it and `closed` resolves
|
|
34
|
+
* with it. A throw reporting `closed` rejects the `close()` that caused it; `closed` resolves either way.
|
|
35
|
+
*/
|
|
36
|
+
onStatus?(status: SupervisedStatus, error?: unknown): void;
|
|
37
|
+
}
|
|
38
|
+
/** One publisher generation: a connection and the namespace it serves. */
|
|
39
|
+
export interface PublisherGeneration {
|
|
40
|
+
/** The generation field: start time in fixed-width base 36, then four random characters, so it sorts by age. */
|
|
41
|
+
generation: string;
|
|
42
|
+
/** The namespace this generation serves: the root followed by `generation`. */
|
|
43
|
+
namespace: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A publisher that reconnects. Create one with {@link connectSupervisedPublisher}. Each connection is a new
|
|
47
|
+
* generation with its own namespace; tracks are registered once and rebound to every generation.
|
|
48
|
+
*/
|
|
49
|
+
export interface SupervisedPublisher {
|
|
50
|
+
/** The live generation, or `undefined` between connections and after closing. */
|
|
51
|
+
readonly generation: PublisherGeneration | undefined;
|
|
52
|
+
/** Where the supervisor stands; see {@link SupervisedStatus}. */
|
|
53
|
+
readonly status: SupervisedStatus;
|
|
54
|
+
/**
|
|
55
|
+
* Register a track every generation serves, and return the writer that outlives the generations. The same rules as
|
|
56
|
+
* `RelayPublisher.registerTrack`, checked at once: track names are unique per supervised publisher, including after
|
|
57
|
+
* their writer closes. Writes wait for demand on the live generation; while none is up they fail with
|
|
58
|
+
* `RECONNECTING`, and an operation the connection's end interrupts fails with `RECONNECTING` too, never `CLOSED`, so
|
|
59
|
+
* a frame writer treats it as an interruption and resumes at the next keyframe.
|
|
60
|
+
*/
|
|
61
|
+
registerTrack(options: RegisterTrackOptions): RelayTrackWriter;
|
|
62
|
+
/** Resolves once the supervisor stops: `close()`, the signal, or a failure it does not retry. Never rejects. */
|
|
63
|
+
readonly closed: Promise<{
|
|
64
|
+
/** The failure that stopped the supervisor, or the signal's reason; absent after `close()`. */
|
|
65
|
+
error?: unknown;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Replace the live generation make-before-break, as happens on its own `rotateBeforeMs` before the credential
|
|
69
|
+
* expires: the next generation connects, with a fresh token, and every track is registered on it. Each track's
|
|
70
|
+
* writer then moves to it at its next write or group, once the track has demand there or has none on the old one.
|
|
71
|
+
* The old generation closes once every track has moved, after 10 seconds at most. A no-op while no generation is up.
|
|
72
|
+
*/
|
|
73
|
+
rotate(): void;
|
|
74
|
+
/** Stop reconnecting and close the live generation as `RelayPublisher.close()` does. Idempotent. */
|
|
75
|
+
close(): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Open a publisher that reconnects: each connection serves `namespace` plus a fresh generation field, and the track
|
|
79
|
+
* writers `registerTrack` returns outlive the connections. Resolves once the first generation is up; see
|
|
80
|
+
* spec/behavior.md, "Supervised connections". The primitives (`connectRelayPublisher`) never reconnect.
|
|
81
|
+
*/
|
|
82
|
+
export declare function connectSupervisedPublisher(options: ConnectSupervisedPublisherOptions): Promise<SupervisedPublisher>;
|
|
83
|
+
/** How a supervisor opens one generation's connection. */
|
|
84
|
+
export type ConnectPublisher = (options: ConnectRelayPublisherOptions) => Promise<RelayPublisher>;
|
|
85
|
+
/**
|
|
86
|
+
* Open a supervised publisher with `connect` (`connectRelayPublisher` in the browser entry point, the Node one in
|
|
87
|
+
* `@caprid/relay/node`). Resolves once the first generation is up. A first attempt that fails on its arguments or the
|
|
88
|
+
* relay refusing the credentials rejects with that failure; any other failure is retried with backoff, bounded only
|
|
89
|
+
* by `signal`, whose abort rejects with its reason.
|
|
90
|
+
*/
|
|
91
|
+
export declare function superviseRelayPublisher(connect: ConnectPublisher, options: ConnectSupervisedPublisherOptions): Promise<SupervisedPublisher>;
|
|
92
|
+
//# sourceMappingURL=supervised-publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervised-publisher.d.ts","sourceRoot":"","sources":["../src/supervised-publisher.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,OAAO,EACL,KAAK,4BAA4B,EAGjC,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAUL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAExB,MAAM,kBAAkB,CAAC;AAI1B,kHAAkH;AAClH,MAAM,WAAW,iCAAkC,SAAQ,mBAAmB;IAC5E;;;OAGG;IACH,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,kGAAkG;IAClG,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5D;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,gHAAgH;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