Live: Migrate to centrifuge-js v3 (new API and client protocol) (#51977)

This commit is contained in:
Alexander Emelin
2022-09-20 18:39:46 +03:00
committed by GitHub
parent 42cf92a3f2
commit 0e6a8cc6ac
10 changed files with 131 additions and 129 deletions

View File

@@ -20,9 +20,9 @@ export enum LiveChannelScope {
* @alpha
*/
export enum LiveChannelType {
DataStream = 'stream', // each message contains a batch of rows that will be appened to previous values
DataStream = 'stream', // each message contains a batch of rows that will be appended to previous values
DataFrame = 'frame', // each message is an entire data frame and should *replace* previous content
JSON = 'json', // arbitray json message
JSON = 'json', // arbitrary json message
}
export enum LiveChannelConnectionState {
@@ -30,11 +30,13 @@ export enum LiveChannelConnectionState {
Pending = 'pending',
/** Connected to the channel */
Connected = 'connected',
/** Connecting to a channel */
Connecting = 'connecting',
/** Disconnected from the channel. The channel will reconnect when possible */
Disconnected = 'disconnected',
/** Was at some point connected, and will not try to reconnect */
Shutdown = 'shutdown',
/** Channel configuraiton was invalid and will not connect */
/** Channel configuration was invalid and will not connect */
Invalid = 'invalid',
}
@@ -139,7 +141,7 @@ export interface LiveChannelAddress {
path: string;
/**
* Additional metadata passed to a channel. The backend will propigate this JSON object to
* Additional metadata passed to a channel. The backend will propagate this JSON object to
* each OnSubscribe and RunStream calls. This value should be constant across multiple requests
* to the same channel path
*/