@topgunbuild/client 0.10.0 → 0.11.0
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/index.d.mts +336 -205
- package/dist/index.d.ts +336 -205
- package/dist/index.js +3111 -1902
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3140 -1933
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LWWRecord, ORMapRecord, PredicateNode, ConflictResolverDef, MergeRejection, Timestamp, LWWMap, ORMap, HLC, EntryProcessorDef, EntryProcessorResult, SearchOptions, PNCounter, PNCounterState, JournalEvent, JournalEventType, NodeHealth, ConnectionPoolConfig, PartitionRouterConfig, PartitionMap, ClusterClientConfig } from '@topgunbuild/core';
|
|
1
|
+
import { LWWRecord, ORMapRecord, PredicateNode, ConflictResolverDef, MergeRejection, Timestamp, LWWMap, ORMap, HLC, EntryProcessorDef, EntryProcessorResult, SearchOptions, HybridQueryRespPayload, HybridQueryDeltaPayload, PNCounter, PNCounterState, JournalEvent, JournalEventType, NodeHealth, ConnectionPoolConfig, PartitionRouterConfig, PartitionMap, ClusterClientConfig } from '@topgunbuild/core';
|
|
2
2
|
export { LWWMap, LWWRecord, PredicateNode, Predicates } from '@topgunbuild/core';
|
|
3
3
|
import pino from 'pino';
|
|
4
4
|
|
|
@@ -99,12 +99,12 @@ interface QueryFilter {
|
|
|
99
99
|
predicate?: PredicateNode;
|
|
100
100
|
sort?: Record<string, 'asc' | 'desc'>;
|
|
101
101
|
limit?: number;
|
|
102
|
-
/** Cursor for pagination
|
|
102
|
+
/** Cursor for pagination */
|
|
103
103
|
cursor?: string;
|
|
104
104
|
}
|
|
105
|
-
/** Cursor status for debugging
|
|
105
|
+
/** Cursor status for debugging */
|
|
106
106
|
type CursorStatus = 'valid' | 'expired' | 'invalid' | 'none';
|
|
107
|
-
/** Pagination info from server
|
|
107
|
+
/** Pagination info from server */
|
|
108
108
|
interface PaginationInfo {
|
|
109
109
|
/** Cursor for fetching next page */
|
|
110
110
|
nextCursor?: string;
|
|
@@ -156,7 +156,7 @@ declare class QueryHandle<T> {
|
|
|
156
156
|
*/
|
|
157
157
|
onUpdate(key: string, value: T | null): void;
|
|
158
158
|
/**
|
|
159
|
-
* Subscribe to change events
|
|
159
|
+
* Subscribe to change events.
|
|
160
160
|
* Returns an unsubscribe function.
|
|
161
161
|
*
|
|
162
162
|
* @example
|
|
@@ -172,25 +172,25 @@ declare class QueryHandle<T> {
|
|
|
172
172
|
*/
|
|
173
173
|
onChanges(listener: (changes: ChangeEvent<T>[]) => void): () => void;
|
|
174
174
|
/**
|
|
175
|
-
* Get and clear pending changes
|
|
175
|
+
* Get and clear pending changes.
|
|
176
176
|
* Call this to retrieve all changes since the last consume.
|
|
177
177
|
*/
|
|
178
178
|
consumeChanges(): ChangeEvent<T>[];
|
|
179
179
|
/**
|
|
180
|
-
* Get last change without consuming
|
|
180
|
+
* Get last change without consuming.
|
|
181
181
|
* Returns null if no pending changes.
|
|
182
182
|
*/
|
|
183
183
|
getLastChange(): ChangeEvent<T> | null;
|
|
184
184
|
/**
|
|
185
|
-
* Get all pending changes without consuming
|
|
185
|
+
* Get all pending changes without consuming.
|
|
186
186
|
*/
|
|
187
187
|
getPendingChanges(): ChangeEvent<T>[];
|
|
188
188
|
/**
|
|
189
|
-
* Clear all pending changes
|
|
189
|
+
* Clear all pending changes.
|
|
190
190
|
*/
|
|
191
191
|
clearChanges(): void;
|
|
192
192
|
/**
|
|
193
|
-
* Reset change tracker
|
|
193
|
+
* Reset change tracker.
|
|
194
194
|
* Use when query filter changes or on reconnect.
|
|
195
195
|
*/
|
|
196
196
|
resetChangeTracker(): void;
|
|
@@ -230,8 +230,6 @@ declare class QueryHandle<T> {
|
|
|
230
230
|
* - Score-based sorting (_score field)
|
|
231
231
|
* - Hybrid queries combining FTS with traditional filters
|
|
232
232
|
*
|
|
233
|
-
* Part of Phase 12: Unified Search
|
|
234
|
-
*
|
|
235
233
|
* @module HybridQueryHandle
|
|
236
234
|
*/
|
|
237
235
|
|
|
@@ -247,7 +245,7 @@ interface HybridQueryFilter {
|
|
|
247
245
|
sort?: Record<string, 'asc' | 'desc'>;
|
|
248
246
|
/** Maximum results */
|
|
249
247
|
limit?: number;
|
|
250
|
-
/** Cursor for pagination
|
|
248
|
+
/** Cursor for pagination */
|
|
251
249
|
cursor?: string;
|
|
252
250
|
}
|
|
253
251
|
/**
|
|
@@ -386,7 +384,7 @@ declare class HybridQueryHandle<T> {
|
|
|
386
384
|
private notifyPaginationListeners;
|
|
387
385
|
}
|
|
388
386
|
|
|
389
|
-
type TopicCallback = (data:
|
|
387
|
+
type TopicCallback<T = unknown> = (data: T, context: {
|
|
390
388
|
timestamp: number;
|
|
391
389
|
publisherId?: string;
|
|
392
390
|
}) => void;
|
|
@@ -399,7 +397,7 @@ declare class TopicHandle {
|
|
|
399
397
|
/**
|
|
400
398
|
* Publish a message to the topic
|
|
401
399
|
*/
|
|
402
|
-
publish(data:
|
|
400
|
+
publish(data: unknown): void;
|
|
403
401
|
/**
|
|
404
402
|
* Subscribe to the topic
|
|
405
403
|
*/
|
|
@@ -408,7 +406,7 @@ declare class TopicHandle {
|
|
|
408
406
|
/**
|
|
409
407
|
* Called by SyncEngine when a message is received
|
|
410
408
|
*/
|
|
411
|
-
onMessage(data:
|
|
409
|
+
onMessage(data: unknown, context: {
|
|
412
410
|
timestamp: number;
|
|
413
411
|
publisherId?: string;
|
|
414
412
|
}): void;
|
|
@@ -837,6 +835,13 @@ declare class ConflictResolverClient {
|
|
|
837
835
|
get rejectionListenerCount(): number;
|
|
838
836
|
}
|
|
839
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Sync Module Types
|
|
840
|
+
*
|
|
841
|
+
* Types and interfaces for the sync module that handles
|
|
842
|
+
* WebSocket/connection operations and query management for SyncEngine.
|
|
843
|
+
*/
|
|
844
|
+
|
|
840
845
|
/**
|
|
841
846
|
* Search result item from server.
|
|
842
847
|
*/
|
|
@@ -846,6 +851,7 @@ interface SearchResult<T> {
|
|
|
846
851
|
score: number;
|
|
847
852
|
matchedTerms: string[];
|
|
848
853
|
}
|
|
854
|
+
|
|
849
855
|
interface HeartbeatConfig {
|
|
850
856
|
intervalMs: number;
|
|
851
857
|
timeoutMs: number;
|
|
@@ -863,50 +869,63 @@ interface BackoffConfig {
|
|
|
863
869
|
/** Maximum number of retry attempts before entering ERROR state (default: 10) */
|
|
864
870
|
maxRetries: number;
|
|
865
871
|
}
|
|
872
|
+
interface TopicQueueConfig {
|
|
873
|
+
/** Maximum queued topic messages when offline (default: 100) */
|
|
874
|
+
maxSize: number;
|
|
875
|
+
/** Strategy when queue is full: 'drop-oldest' | 'drop-newest' (default: 'drop-oldest') */
|
|
876
|
+
strategy: 'drop-oldest' | 'drop-newest';
|
|
877
|
+
}
|
|
866
878
|
interface SyncEngineConfig {
|
|
867
879
|
nodeId: string;
|
|
868
|
-
/**
|
|
869
|
-
|
|
870
|
-
/** Connection provider (preferred over serverUrl) */
|
|
871
|
-
connectionProvider?: IConnectionProvider;
|
|
880
|
+
/** Connection provider for WebSocket connections */
|
|
881
|
+
connectionProvider: IConnectionProvider;
|
|
872
882
|
storageAdapter: IStorageAdapter;
|
|
873
883
|
reconnectInterval?: number;
|
|
874
884
|
heartbeat?: Partial<HeartbeatConfig>;
|
|
875
885
|
backoff?: Partial<BackoffConfig>;
|
|
876
886
|
backpressure?: Partial<BackpressureConfig>;
|
|
887
|
+
/** Configuration for offline topic message queue */
|
|
888
|
+
topicQueue?: Partial<TopicQueueConfig>;
|
|
877
889
|
}
|
|
878
890
|
declare class SyncEngine {
|
|
879
891
|
private readonly nodeId;
|
|
880
|
-
private readonly serverUrl;
|
|
881
892
|
private readonly storageAdapter;
|
|
882
893
|
private readonly hlc;
|
|
883
894
|
private readonly stateMachine;
|
|
895
|
+
private readonly heartbeatConfig;
|
|
884
896
|
private readonly backoffConfig;
|
|
885
|
-
private readonly
|
|
886
|
-
private readonly
|
|
887
|
-
private
|
|
897
|
+
private readonly webSocketManager;
|
|
898
|
+
private readonly queryManager;
|
|
899
|
+
private readonly topicManager;
|
|
900
|
+
private readonly lockManager;
|
|
901
|
+
private readonly writeConcernManager;
|
|
902
|
+
private readonly counterManager;
|
|
903
|
+
private readonly entryProcessorClient;
|
|
904
|
+
private readonly searchClient;
|
|
905
|
+
private readonly merkleSyncHandler;
|
|
906
|
+
private readonly orMapSyncHandler;
|
|
907
|
+
private readonly messageRouter;
|
|
888
908
|
private opLog;
|
|
889
909
|
private maps;
|
|
890
|
-
private queries;
|
|
891
|
-
private topics;
|
|
892
|
-
private pendingLockRequests;
|
|
893
910
|
private lastSyncTimestamp;
|
|
894
|
-
private reconnectTimer;
|
|
895
911
|
private authToken;
|
|
896
912
|
private tokenProvider;
|
|
897
|
-
private backoffAttempt;
|
|
898
|
-
private readonly heartbeatConfig;
|
|
899
|
-
private heartbeatInterval;
|
|
900
|
-
private lastPongReceived;
|
|
901
|
-
private lastRoundTripTime;
|
|
902
913
|
private readonly backpressureConfig;
|
|
903
|
-
private
|
|
904
|
-
private waitingForCapacity;
|
|
905
|
-
private highWaterMarkEmitted;
|
|
906
|
-
private backpressureListeners;
|
|
907
|
-
private pendingWriteConcernPromises;
|
|
914
|
+
private readonly backpressureController;
|
|
908
915
|
private readonly conflictResolverClient;
|
|
909
916
|
constructor(config: SyncEngineConfig);
|
|
917
|
+
/**
|
|
918
|
+
* Called when connection is established (initial or reconnect).
|
|
919
|
+
*/
|
|
920
|
+
private handleConnectionEstablished;
|
|
921
|
+
/**
|
|
922
|
+
* Called when connection is lost.
|
|
923
|
+
*/
|
|
924
|
+
private handleConnectionLost;
|
|
925
|
+
/**
|
|
926
|
+
* Called when reconnection succeeds.
|
|
927
|
+
*/
|
|
928
|
+
private handleReconnection;
|
|
910
929
|
/**
|
|
911
930
|
* Get the current connection state
|
|
912
931
|
*/
|
|
@@ -932,33 +951,11 @@ declare class SyncEngine {
|
|
|
932
951
|
* Check if fully connected and synced
|
|
933
952
|
*/
|
|
934
953
|
private isConnected;
|
|
935
|
-
/**
|
|
936
|
-
* Initialize connection using IConnectionProvider (Phase 4.5 cluster mode).
|
|
937
|
-
* Sets up event handlers for the connection provider.
|
|
938
|
-
*/
|
|
939
|
-
private initConnectionProvider;
|
|
940
|
-
/**
|
|
941
|
-
* Initialize connection using direct WebSocket (legacy single-server mode).
|
|
942
|
-
*/
|
|
943
|
-
private initConnection;
|
|
944
|
-
private scheduleReconnect;
|
|
945
|
-
private calculateBackoffDelay;
|
|
946
|
-
/**
|
|
947
|
-
* Reset backoff counter (called on successful connection)
|
|
948
|
-
*/
|
|
949
|
-
private resetBackoff;
|
|
950
954
|
/**
|
|
951
955
|
* Send a message through the current connection.
|
|
952
|
-
*
|
|
953
|
-
* @param message Message object to serialize and send
|
|
954
|
-
* @param key Optional key for routing (cluster mode only)
|
|
955
|
-
* @returns true if message was sent, false otherwise
|
|
956
|
+
* Delegates to WebSocketManager.
|
|
956
957
|
*/
|
|
957
958
|
private sendMessage;
|
|
958
|
-
/**
|
|
959
|
-
* Check if we can send messages (connection is ready).
|
|
960
|
-
*/
|
|
961
|
-
private canSend;
|
|
962
959
|
private loadOpLog;
|
|
963
960
|
private saveOpLog;
|
|
964
961
|
registerMap(mapName: string, map: LWWMap<any, any> | ORMap<any, any>): void;
|
|
@@ -973,25 +970,69 @@ declare class SyncEngine {
|
|
|
973
970
|
setAuthToken(token: string): void;
|
|
974
971
|
setTokenProvider(provider: () => Promise<string | null>): void;
|
|
975
972
|
private sendAuth;
|
|
973
|
+
/**
|
|
974
|
+
* Subscribe to a standard query.
|
|
975
|
+
* Delegates to QueryManager.
|
|
976
|
+
*/
|
|
976
977
|
subscribeToQuery(query: QueryHandle<any>): void;
|
|
978
|
+
/**
|
|
979
|
+
* Subscribe to a topic.
|
|
980
|
+
* Delegates to TopicManager.
|
|
981
|
+
*/
|
|
977
982
|
subscribeToTopic(topic: string, handle: TopicHandle): void;
|
|
983
|
+
/**
|
|
984
|
+
* Unsubscribe from a topic.
|
|
985
|
+
* Delegates to TopicManager.
|
|
986
|
+
*/
|
|
978
987
|
unsubscribeFromTopic(topic: string): void;
|
|
979
|
-
publishTopic(topic: string, data: any): void;
|
|
980
|
-
private sendTopicSubscription;
|
|
981
988
|
/**
|
|
982
|
-
*
|
|
989
|
+
* Publish a message to a topic.
|
|
990
|
+
* Delegates to TopicManager.
|
|
991
|
+
*/
|
|
992
|
+
publishTopic(topic: string, data: unknown): void;
|
|
993
|
+
/**
|
|
994
|
+
* Get topic queue status.
|
|
995
|
+
* Delegates to TopicManager.
|
|
996
|
+
*/
|
|
997
|
+
getTopicQueueStatus(): {
|
|
998
|
+
size: number;
|
|
999
|
+
maxSize: number;
|
|
1000
|
+
};
|
|
1001
|
+
/**
|
|
1002
|
+
* Executes a query against local storage immediately.
|
|
1003
|
+
* Delegates to QueryManager.
|
|
983
1004
|
*/
|
|
984
1005
|
runLocalQuery(mapName: string, filter: QueryFilter): Promise<{
|
|
985
1006
|
key: string;
|
|
986
1007
|
value: any;
|
|
987
1008
|
}[]>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Unsubscribe from a query.
|
|
1011
|
+
* Delegates to QueryManager.
|
|
1012
|
+
*/
|
|
988
1013
|
unsubscribeFromQuery(queryId: string): void;
|
|
989
|
-
|
|
1014
|
+
/**
|
|
1015
|
+
* Request a distributed lock.
|
|
1016
|
+
* Delegates to LockManager.
|
|
1017
|
+
*/
|
|
990
1018
|
requestLock(name: string, requestId: string, ttl: number): Promise<{
|
|
991
1019
|
fencingToken: number;
|
|
992
1020
|
}>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Release a distributed lock.
|
|
1023
|
+
* Delegates to LockManager.
|
|
1024
|
+
*/
|
|
993
1025
|
releaseLock(name: string, requestId: string, fencingToken: number): Promise<boolean>;
|
|
994
1026
|
private handleServerMessage;
|
|
1027
|
+
private handleBatch;
|
|
1028
|
+
private handleAuthAck;
|
|
1029
|
+
private handleAuthFail;
|
|
1030
|
+
private handleOpAck;
|
|
1031
|
+
private handleQueryResp;
|
|
1032
|
+
private handleQueryUpdate;
|
|
1033
|
+
private handleServerEvent;
|
|
1034
|
+
private handleServerBatchEvent;
|
|
1035
|
+
private handleGcPrune;
|
|
995
1036
|
getHLC(): HLC;
|
|
996
1037
|
/**
|
|
997
1038
|
* Helper method to apply a single server event to the local map.
|
|
@@ -1045,26 +1086,6 @@ declare class SyncEngine {
|
|
|
1045
1086
|
*/
|
|
1046
1087
|
getConnectionProvider(): IConnectionProvider;
|
|
1047
1088
|
private resetMap;
|
|
1048
|
-
/**
|
|
1049
|
-
* Starts the heartbeat mechanism after successful connection.
|
|
1050
|
-
*/
|
|
1051
|
-
private startHeartbeat;
|
|
1052
|
-
/**
|
|
1053
|
-
* Stops the heartbeat mechanism.
|
|
1054
|
-
*/
|
|
1055
|
-
private stopHeartbeat;
|
|
1056
|
-
/**
|
|
1057
|
-
* Sends a PING message to the server.
|
|
1058
|
-
*/
|
|
1059
|
-
private sendPing;
|
|
1060
|
-
/**
|
|
1061
|
-
* Handles incoming PONG message from server.
|
|
1062
|
-
*/
|
|
1063
|
-
private handlePong;
|
|
1064
|
-
/**
|
|
1065
|
-
* Checks if heartbeat has timed out and triggers reconnection if needed.
|
|
1066
|
-
*/
|
|
1067
|
-
private checkHeartbeatTimeout;
|
|
1068
1089
|
/**
|
|
1069
1090
|
* Returns the last measured round-trip time in milliseconds.
|
|
1070
1091
|
* Returns null if no PONG has been received yet.
|
|
@@ -1076,108 +1097,68 @@ declare class SyncEngine {
|
|
|
1076
1097
|
* a PONG within the timeout window.
|
|
1077
1098
|
*/
|
|
1078
1099
|
isConnectionHealthy(): boolean;
|
|
1079
|
-
/**
|
|
1080
|
-
* Push local ORMap diff to server for the given keys.
|
|
1081
|
-
* Sends local records and tombstones that the server might not have.
|
|
1082
|
-
*/
|
|
1083
|
-
private pushORMapDiff;
|
|
1084
1100
|
/**
|
|
1085
1101
|
* Get the current number of pending (unsynced) operations.
|
|
1102
|
+
* Delegates to BackpressureController.
|
|
1086
1103
|
*/
|
|
1087
1104
|
getPendingOpsCount(): number;
|
|
1088
1105
|
/**
|
|
1089
1106
|
* Get the current backpressure status.
|
|
1107
|
+
* Delegates to BackpressureController.
|
|
1090
1108
|
*/
|
|
1091
1109
|
getBackpressureStatus(): BackpressureStatus;
|
|
1092
1110
|
/**
|
|
1093
1111
|
* Returns true if writes are currently paused due to backpressure.
|
|
1112
|
+
* Delegates to BackpressureController.
|
|
1094
1113
|
*/
|
|
1095
1114
|
isBackpressurePaused(): boolean;
|
|
1096
1115
|
/**
|
|
1097
1116
|
* Subscribe to backpressure events.
|
|
1117
|
+
* Delegates to BackpressureController.
|
|
1098
1118
|
* @param event Event name: 'backpressure:high', 'backpressure:low', 'backpressure:paused', 'backpressure:resumed', 'operation:dropped'
|
|
1099
1119
|
* @param listener Callback function
|
|
1100
1120
|
* @returns Unsubscribe function
|
|
1101
1121
|
*/
|
|
1102
1122
|
onBackpressure(event: 'backpressure:high' | 'backpressure:low' | 'backpressure:paused' | 'backpressure:resumed' | 'operation:dropped', listener: (data?: BackpressureThresholdEvent | OperationDroppedEvent) => void): () => void;
|
|
1103
|
-
/**
|
|
1104
|
-
* Emit a backpressure event to all listeners.
|
|
1105
|
-
*/
|
|
1106
|
-
private emitBackpressureEvent;
|
|
1107
|
-
/**
|
|
1108
|
-
* Check backpressure before adding a new operation.
|
|
1109
|
-
* May pause, throw, or drop depending on strategy.
|
|
1110
|
-
*/
|
|
1111
|
-
private checkBackpressure;
|
|
1112
|
-
/**
|
|
1113
|
-
* Check high water mark and emit event if threshold reached.
|
|
1114
|
-
*/
|
|
1115
|
-
private checkHighWaterMark;
|
|
1116
|
-
/**
|
|
1117
|
-
* Check low water mark and resume paused writes if threshold reached.
|
|
1118
|
-
*/
|
|
1119
|
-
private checkLowWaterMark;
|
|
1120
|
-
/**
|
|
1121
|
-
* Wait for capacity to become available (used by 'pause' strategy).
|
|
1122
|
-
*/
|
|
1123
|
-
private waitForCapacity;
|
|
1124
|
-
/**
|
|
1125
|
-
* Drop the oldest pending operation (used by 'drop-oldest' strategy).
|
|
1126
|
-
*/
|
|
1127
|
-
private dropOldestOp;
|
|
1128
1123
|
/**
|
|
1129
1124
|
* Register a pending Write Concern promise for an operation.
|
|
1130
|
-
*
|
|
1125
|
+
* Delegates to WriteConcernManager.
|
|
1131
1126
|
*
|
|
1132
1127
|
* @param opId - Operation ID
|
|
1133
1128
|
* @param timeout - Timeout in ms (default: 5000)
|
|
1134
1129
|
* @returns Promise that resolves with the Write Concern result
|
|
1135
1130
|
*/
|
|
1136
1131
|
registerWriteConcernPromise(opId: string, timeout?: number): Promise<any>;
|
|
1137
|
-
/**
|
|
1138
|
-
* Resolve a pending Write Concern promise with the server result.
|
|
1139
|
-
*
|
|
1140
|
-
* @param opId - Operation ID
|
|
1141
|
-
* @param result - Result from server ACK
|
|
1142
|
-
*/
|
|
1143
|
-
private resolveWriteConcernPromise;
|
|
1144
|
-
/**
|
|
1145
|
-
* Cancel all pending Write Concern promises (e.g., on disconnect).
|
|
1146
|
-
*/
|
|
1147
|
-
private cancelAllWriteConcernPromises;
|
|
1148
|
-
/** Counter update listeners by name */
|
|
1149
|
-
private counterUpdateListeners;
|
|
1150
1132
|
/**
|
|
1151
1133
|
* Subscribe to counter updates from server.
|
|
1134
|
+
* Delegates to CounterManager.
|
|
1152
1135
|
* @param name Counter name
|
|
1153
1136
|
* @param listener Callback when counter state is updated
|
|
1154
1137
|
* @returns Unsubscribe function
|
|
1155
1138
|
*/
|
|
1156
|
-
onCounterUpdate(name: string, listener: (state:
|
|
1139
|
+
onCounterUpdate(name: string, listener: (state: {
|
|
1140
|
+
positive: Map<string, number>;
|
|
1141
|
+
negative: Map<string, number>;
|
|
1142
|
+
}) => void): () => void;
|
|
1157
1143
|
/**
|
|
1158
1144
|
* Request initial counter state from server.
|
|
1145
|
+
* Delegates to CounterManager.
|
|
1159
1146
|
* @param name Counter name
|
|
1160
1147
|
*/
|
|
1161
1148
|
requestCounter(name: string): void;
|
|
1162
1149
|
/**
|
|
1163
1150
|
* Sync local counter state to server.
|
|
1151
|
+
* Delegates to CounterManager.
|
|
1164
1152
|
* @param name Counter name
|
|
1165
1153
|
* @param state Counter state to sync
|
|
1166
1154
|
*/
|
|
1167
|
-
syncCounter(name: string, state:
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
*/
|
|
1172
|
-
private handleCounterUpdate;
|
|
1173
|
-
/** Pending entry processor requests by requestId */
|
|
1174
|
-
private pendingProcessorRequests;
|
|
1175
|
-
/** Pending batch entry processor requests by requestId */
|
|
1176
|
-
private pendingBatchProcessorRequests;
|
|
1177
|
-
/** Default timeout for entry processor requests (ms) */
|
|
1178
|
-
private static readonly PROCESSOR_TIMEOUT;
|
|
1155
|
+
syncCounter(name: string, state: {
|
|
1156
|
+
positive: Map<string, number>;
|
|
1157
|
+
negative: Map<string, number>;
|
|
1158
|
+
}): void;
|
|
1179
1159
|
/**
|
|
1180
1160
|
* Execute an entry processor on a single key atomically.
|
|
1161
|
+
* Delegates to EntryProcessorClient.
|
|
1181
1162
|
*
|
|
1182
1163
|
* @param mapName Name of the map
|
|
1183
1164
|
* @param key Key to process
|
|
@@ -1187,6 +1168,7 @@ declare class SyncEngine {
|
|
|
1187
1168
|
executeOnKey<V, R = V>(mapName: string, key: string, processor: EntryProcessorDef<V, R>): Promise<EntryProcessorResult<R>>;
|
|
1188
1169
|
/**
|
|
1189
1170
|
* Execute an entry processor on multiple keys.
|
|
1171
|
+
* Delegates to EntryProcessorClient.
|
|
1190
1172
|
*
|
|
1191
1173
|
* @param mapName Name of the map
|
|
1192
1174
|
* @param keys Keys to process
|
|
@@ -1194,16 +1176,6 @@ declare class SyncEngine {
|
|
|
1194
1176
|
* @returns Promise resolving to a map of key -> result
|
|
1195
1177
|
*/
|
|
1196
1178
|
executeOnKeys<V, R = V>(mapName: string, keys: string[], processor: EntryProcessorDef<V, R>): Promise<Map<string, EntryProcessorResult<R>>>;
|
|
1197
|
-
/**
|
|
1198
|
-
* Handle entry processor response from server.
|
|
1199
|
-
* Called by handleServerMessage for ENTRY_PROCESS_RESPONSE messages.
|
|
1200
|
-
*/
|
|
1201
|
-
private handleEntryProcessResponse;
|
|
1202
|
-
/**
|
|
1203
|
-
* Handle entry processor batch response from server.
|
|
1204
|
-
* Called by handleServerMessage for ENTRY_PROCESS_BATCH_RESPONSE messages.
|
|
1205
|
-
*/
|
|
1206
|
-
private handleEntryProcessBatchResponse;
|
|
1207
1179
|
/** Message listeners for journal and other generic messages */
|
|
1208
1180
|
private messageListeners;
|
|
1209
1181
|
/**
|
|
@@ -1213,32 +1185,29 @@ declare class SyncEngine {
|
|
|
1213
1185
|
* @param event Event type (currently only 'message')
|
|
1214
1186
|
* @param handler Message handler
|
|
1215
1187
|
*/
|
|
1216
|
-
on(event: 'message', handler: (message:
|
|
1188
|
+
on(event: 'message', handler: (message: unknown) => void): void;
|
|
1217
1189
|
/**
|
|
1218
1190
|
* Unsubscribe from incoming messages.
|
|
1219
1191
|
*
|
|
1220
1192
|
* @param event Event type (currently only 'message')
|
|
1221
1193
|
* @param handler Message handler to remove
|
|
1222
1194
|
*/
|
|
1223
|
-
off(event: 'message', handler: (message:
|
|
1195
|
+
off(event: 'message', handler: (message: unknown) => void): void;
|
|
1224
1196
|
/**
|
|
1225
1197
|
* Send a message to the server.
|
|
1226
1198
|
* Public method for EventJournalReader and other components.
|
|
1227
1199
|
*
|
|
1228
1200
|
* @param message Message object to send
|
|
1229
1201
|
*/
|
|
1230
|
-
send(message:
|
|
1202
|
+
send(message: unknown): void;
|
|
1231
1203
|
/**
|
|
1232
1204
|
* Emit message to all listeners.
|
|
1233
1205
|
* Called internally when a message is received.
|
|
1234
1206
|
*/
|
|
1235
1207
|
private emitMessage;
|
|
1236
|
-
/** Pending search requests by requestId */
|
|
1237
|
-
private pendingSearchRequests;
|
|
1238
|
-
/** Default timeout for search requests (ms) */
|
|
1239
|
-
private static readonly SEARCH_TIMEOUT;
|
|
1240
1208
|
/**
|
|
1241
1209
|
* Perform a one-shot BM25 search on the server.
|
|
1210
|
+
* Delegates to SearchClient.
|
|
1242
1211
|
*
|
|
1243
1212
|
* @param mapName Name of the map to search
|
|
1244
1213
|
* @param query Search query text
|
|
@@ -1246,33 +1215,24 @@ declare class SyncEngine {
|
|
|
1246
1215
|
* @returns Promise resolving to search results
|
|
1247
1216
|
*/
|
|
1248
1217
|
search<T>(mapName: string, query: string, options?: SearchOptions): Promise<SearchResult<T>[]>;
|
|
1249
|
-
/**
|
|
1250
|
-
* Handle search response from server.
|
|
1251
|
-
*/
|
|
1252
|
-
private handleSearchResponse;
|
|
1253
1218
|
/**
|
|
1254
1219
|
* Get the conflict resolver client for registering custom resolvers
|
|
1255
1220
|
* and subscribing to merge rejection events.
|
|
1256
1221
|
*/
|
|
1257
1222
|
getConflictResolverClient(): ConflictResolverClient;
|
|
1258
|
-
/** Active hybrid query subscriptions */
|
|
1259
|
-
private hybridQueries;
|
|
1260
1223
|
/**
|
|
1261
1224
|
* Subscribe to a hybrid query (FTS + filter combination).
|
|
1225
|
+
* Delegates to QueryManager.
|
|
1262
1226
|
*/
|
|
1263
1227
|
subscribeToHybridQuery<T>(query: HybridQueryHandle<T>): void;
|
|
1264
1228
|
/**
|
|
1265
1229
|
* Unsubscribe from a hybrid query.
|
|
1230
|
+
* Delegates to QueryManager.
|
|
1266
1231
|
*/
|
|
1267
1232
|
unsubscribeFromHybridQuery(queryId: string): void;
|
|
1268
|
-
/**
|
|
1269
|
-
* Send hybrid query subscription to server.
|
|
1270
|
-
*/
|
|
1271
|
-
private sendHybridQuerySubscription;
|
|
1272
1233
|
/**
|
|
1273
1234
|
* Run a local hybrid query (FTS + filter combination).
|
|
1274
|
-
*
|
|
1275
|
-
* Server provides actual FTS scoring.
|
|
1235
|
+
* Delegates to QueryManager.
|
|
1276
1236
|
*/
|
|
1277
1237
|
runLocalHybridQuery<T>(mapName: string, filter: HybridQueryFilter): Promise<Array<{
|
|
1278
1238
|
key: string;
|
|
@@ -1283,29 +1243,11 @@ declare class SyncEngine {
|
|
|
1283
1243
|
/**
|
|
1284
1244
|
* Handle hybrid query response from server.
|
|
1285
1245
|
*/
|
|
1286
|
-
handleHybridQueryResponse(payload:
|
|
1287
|
-
subscriptionId: string;
|
|
1288
|
-
results: Array<{
|
|
1289
|
-
key: string;
|
|
1290
|
-
value: unknown;
|
|
1291
|
-
score: number;
|
|
1292
|
-
matchedTerms: string[];
|
|
1293
|
-
}>;
|
|
1294
|
-
nextCursor?: string;
|
|
1295
|
-
hasMore?: boolean;
|
|
1296
|
-
cursorStatus?: 'valid' | 'expired' | 'invalid' | 'none';
|
|
1297
|
-
}): void;
|
|
1246
|
+
handleHybridQueryResponse(payload: HybridQueryRespPayload): void;
|
|
1298
1247
|
/**
|
|
1299
1248
|
* Handle hybrid query delta update from server.
|
|
1300
1249
|
*/
|
|
1301
|
-
handleHybridQueryDelta(payload:
|
|
1302
|
-
subscriptionId: string;
|
|
1303
|
-
key: string;
|
|
1304
|
-
value: unknown | null;
|
|
1305
|
-
score?: number;
|
|
1306
|
-
matchedTerms?: string[];
|
|
1307
|
-
type: 'ENTER' | 'UPDATE' | 'LEAVE';
|
|
1308
|
-
}): void;
|
|
1250
|
+
handleHybridQueryDelta(payload: HybridQueryDeltaPayload): void;
|
|
1309
1251
|
}
|
|
1310
1252
|
|
|
1311
1253
|
interface ILock {
|
|
@@ -1488,7 +1430,6 @@ declare class EventJournalReader {
|
|
|
1488
1430
|
* SearchHandle - Client-side Live Search Subscription Handle
|
|
1489
1431
|
*
|
|
1490
1432
|
* Manages a live search subscription with delta updates.
|
|
1491
|
-
* Part of Phase 11.1b: Live Search Subscriptions.
|
|
1492
1433
|
*
|
|
1493
1434
|
* @module SearchHandle
|
|
1494
1435
|
*/
|
|
@@ -2197,8 +2138,6 @@ declare class BackpressureError extends Error {
|
|
|
2197
2138
|
/**
|
|
2198
2139
|
* ConnectionPool - Manages WebSocket connections to multiple cluster nodes
|
|
2199
2140
|
*
|
|
2200
|
-
* Phase 4: Partition-Aware Client Routing
|
|
2201
|
-
*
|
|
2202
2141
|
* Features:
|
|
2203
2142
|
* - Maintains connections to all known cluster nodes
|
|
2204
2143
|
* - Automatic reconnection with exponential backoff
|
|
@@ -2305,8 +2244,6 @@ declare class ConnectionPool {
|
|
|
2305
2244
|
/**
|
|
2306
2245
|
* PartitionRouter - Routes operations to the correct cluster node
|
|
2307
2246
|
*
|
|
2308
|
-
* Phase 4: Partition-Aware Client Routing
|
|
2309
|
-
*
|
|
2310
2247
|
* Features:
|
|
2311
2248
|
* - Maintains local copy of partition map
|
|
2312
2249
|
* - Routes keys to owner nodes using consistent hashing
|
|
@@ -2439,9 +2376,7 @@ declare class PartitionRouter {
|
|
|
2439
2376
|
/**
|
|
2440
2377
|
* ClusterClient - Cluster-aware client wrapper
|
|
2441
2378
|
*
|
|
2442
|
-
*
|
|
2443
|
-
* Phase 4.5: Implements IConnectionProvider for SyncEngine abstraction
|
|
2444
|
-
*
|
|
2379
|
+
* Implements IConnectionProvider for SyncEngine abstraction.
|
|
2445
2380
|
* Wraps the standard TopGunClient with cluster-aware routing capabilities.
|
|
2446
2381
|
* Coordinates between ConnectionPool and PartitionRouter for optimal
|
|
2447
2382
|
* request routing in a clustered environment.
|
|
@@ -2572,11 +2507,6 @@ declare class ClusterClient implements IConnectionProvider {
|
|
|
2572
2507
|
* Set authentication token
|
|
2573
2508
|
*/
|
|
2574
2509
|
setAuthToken(token: string): void;
|
|
2575
|
-
/**
|
|
2576
|
-
* Send operation with automatic routing (legacy API for cluster operations).
|
|
2577
|
-
* @deprecated Use send(data, key) for IConnectionProvider interface
|
|
2578
|
-
*/
|
|
2579
|
-
sendMessage(key: string, message: any): boolean;
|
|
2580
2510
|
/**
|
|
2581
2511
|
* Send directly to partition owner
|
|
2582
2512
|
*/
|
|
@@ -2762,6 +2692,207 @@ declare class SingleServerProvider implements IConnectionProvider {
|
|
|
2762
2692
|
resetReconnectAttempts(): void;
|
|
2763
2693
|
}
|
|
2764
2694
|
|
|
2695
|
+
/**
|
|
2696
|
+
* Configuration for HttpSyncProvider.
|
|
2697
|
+
*/
|
|
2698
|
+
interface HttpSyncProviderConfig {
|
|
2699
|
+
/** HTTP URL of the TopGun server (e.g., 'http://localhost:8080') */
|
|
2700
|
+
url: string;
|
|
2701
|
+
/** Client identifier for the server to track HLC state */
|
|
2702
|
+
clientId: string;
|
|
2703
|
+
/** Hybrid Logical Clock instance for causality tracking */
|
|
2704
|
+
hlc: HLC;
|
|
2705
|
+
/** JWT auth token for Authorization header */
|
|
2706
|
+
authToken?: string;
|
|
2707
|
+
/** Polling interval in milliseconds (default: 5000) */
|
|
2708
|
+
pollIntervalMs?: number;
|
|
2709
|
+
/** HTTP request timeout in milliseconds (default: 30000) */
|
|
2710
|
+
requestTimeoutMs?: number;
|
|
2711
|
+
/** Map names to sync deltas for on each poll */
|
|
2712
|
+
syncMaps?: string[];
|
|
2713
|
+
/** Custom fetch implementation for testing or platform compatibility */
|
|
2714
|
+
fetchImpl?: typeof fetch;
|
|
2715
|
+
}
|
|
2716
|
+
/**
|
|
2717
|
+
* HTTP-based connection provider for serverless environments.
|
|
2718
|
+
*
|
|
2719
|
+
* Implements IConnectionProvider by translating WebSocket-style send() calls
|
|
2720
|
+
* into queued operations that are flushed via HTTP POST /sync at regular
|
|
2721
|
+
* polling intervals. Responses are translated back into synthetic message
|
|
2722
|
+
* events that SyncEngine understands.
|
|
2723
|
+
*
|
|
2724
|
+
* This provider is completely stateless on the server side -- each request
|
|
2725
|
+
* carries the client's HLC state and the server computes deltas without
|
|
2726
|
+
* maintaining per-client state.
|
|
2727
|
+
*/
|
|
2728
|
+
declare class HttpSyncProvider implements IConnectionProvider {
|
|
2729
|
+
private readonly url;
|
|
2730
|
+
private readonly clientId;
|
|
2731
|
+
private readonly hlc;
|
|
2732
|
+
private readonly pollIntervalMs;
|
|
2733
|
+
private readonly requestTimeoutMs;
|
|
2734
|
+
private readonly syncMaps;
|
|
2735
|
+
private readonly fetchImpl;
|
|
2736
|
+
private authToken;
|
|
2737
|
+
private listeners;
|
|
2738
|
+
private pollTimer;
|
|
2739
|
+
/** Queued operations to send on next poll */
|
|
2740
|
+
private pendingOperations;
|
|
2741
|
+
/** Queued one-shot queries to send on next poll */
|
|
2742
|
+
private pendingQueries;
|
|
2743
|
+
/** Per-map last sync timestamps for delta tracking */
|
|
2744
|
+
private lastSyncTimestamps;
|
|
2745
|
+
/** Whether the last HTTP request succeeded */
|
|
2746
|
+
private connected;
|
|
2747
|
+
/** Whether we were previously connected (for reconnected event) */
|
|
2748
|
+
private wasConnected;
|
|
2749
|
+
constructor(config: HttpSyncProviderConfig);
|
|
2750
|
+
/**
|
|
2751
|
+
* Connect by sending an initial sync request to verify auth and get state.
|
|
2752
|
+
*/
|
|
2753
|
+
connect(): Promise<void>;
|
|
2754
|
+
/**
|
|
2755
|
+
* Get connection for a specific key.
|
|
2756
|
+
* HTTP mode does not expose raw WebSocket connections.
|
|
2757
|
+
*/
|
|
2758
|
+
getConnection(_key: string): WebSocket;
|
|
2759
|
+
/**
|
|
2760
|
+
* Get any available connection.
|
|
2761
|
+
* HTTP mode does not expose raw WebSocket connections.
|
|
2762
|
+
*/
|
|
2763
|
+
getAnyConnection(): WebSocket;
|
|
2764
|
+
/**
|
|
2765
|
+
* Check if connected (last HTTP request succeeded).
|
|
2766
|
+
*/
|
|
2767
|
+
isConnected(): boolean;
|
|
2768
|
+
/**
|
|
2769
|
+
* Get connected node IDs.
|
|
2770
|
+
* Returns ['http'] when connected, [] when not.
|
|
2771
|
+
*/
|
|
2772
|
+
getConnectedNodes(): string[];
|
|
2773
|
+
/**
|
|
2774
|
+
* Subscribe to connection events.
|
|
2775
|
+
*/
|
|
2776
|
+
on(event: ConnectionProviderEvent, handler: ConnectionEventHandler): void;
|
|
2777
|
+
/**
|
|
2778
|
+
* Unsubscribe from connection events.
|
|
2779
|
+
*/
|
|
2780
|
+
off(event: ConnectionProviderEvent, handler: ConnectionEventHandler): void;
|
|
2781
|
+
/**
|
|
2782
|
+
* Send data via the HTTP sync provider.
|
|
2783
|
+
*
|
|
2784
|
+
* Deserializes the msgpackr binary to extract the message type and routes:
|
|
2785
|
+
* - OP_BATCH / CLIENT_OP: queued as operations for next poll
|
|
2786
|
+
* - AUTH: silently ignored (auth via HTTP header)
|
|
2787
|
+
* - SYNC_INIT: silently ignored (HTTP uses timestamp-based deltas)
|
|
2788
|
+
* - QUERY_SUB: queued as one-shot query for next poll
|
|
2789
|
+
* - All other types: silently dropped with debug log
|
|
2790
|
+
*/
|
|
2791
|
+
send(data: ArrayBuffer | Uint8Array, _key?: string): void;
|
|
2792
|
+
/**
|
|
2793
|
+
* Close the HTTP sync provider.
|
|
2794
|
+
* Stops the polling loop, clears queued operations, and sets disconnected state.
|
|
2795
|
+
*/
|
|
2796
|
+
close(): Promise<void>;
|
|
2797
|
+
/**
|
|
2798
|
+
* Update the auth token (e.g., after token refresh).
|
|
2799
|
+
*/
|
|
2800
|
+
setAuthToken(token: string): void;
|
|
2801
|
+
/**
|
|
2802
|
+
* Send an HTTP sync request with queued operations and receive deltas.
|
|
2803
|
+
*/
|
|
2804
|
+
private doSyncRequest;
|
|
2805
|
+
/**
|
|
2806
|
+
* Start the polling loop.
|
|
2807
|
+
*/
|
|
2808
|
+
private startPolling;
|
|
2809
|
+
/**
|
|
2810
|
+
* Stop the polling loop.
|
|
2811
|
+
*/
|
|
2812
|
+
private stopPolling;
|
|
2813
|
+
/**
|
|
2814
|
+
* Emit an event to all listeners.
|
|
2815
|
+
*/
|
|
2816
|
+
private emit;
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
/**
|
|
2820
|
+
* Configuration for AutoConnectionProvider.
|
|
2821
|
+
*/
|
|
2822
|
+
interface AutoConnectionProviderConfig {
|
|
2823
|
+
/** Server URL (ws:// or http://) */
|
|
2824
|
+
url: string;
|
|
2825
|
+
/** Client identifier */
|
|
2826
|
+
clientId: string;
|
|
2827
|
+
/** Hybrid Logical Clock instance */
|
|
2828
|
+
hlc: HLC;
|
|
2829
|
+
/** Max WebSocket connection attempts before falling back to HTTP (default: 3) */
|
|
2830
|
+
maxWsAttempts?: number;
|
|
2831
|
+
/** JWT auth token */
|
|
2832
|
+
authToken?: string;
|
|
2833
|
+
/** Skip WebSocket and go HTTP-only */
|
|
2834
|
+
httpOnly?: boolean;
|
|
2835
|
+
/** HTTP polling interval in ms (default: 5000) */
|
|
2836
|
+
httpPollIntervalMs?: number;
|
|
2837
|
+
/** Map names to sync via HTTP */
|
|
2838
|
+
syncMaps?: string[];
|
|
2839
|
+
/** Custom fetch implementation for HTTP mode */
|
|
2840
|
+
fetchImpl?: typeof fetch;
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* AutoConnectionProvider implements protocol negotiation by trying WebSocket
|
|
2844
|
+
* first and falling back to HTTP sync when WebSocket connection fails.
|
|
2845
|
+
*
|
|
2846
|
+
* This enables seamless deployment in both traditional server environments
|
|
2847
|
+
* (using WebSockets) and serverless environments (using HTTP polling).
|
|
2848
|
+
*/
|
|
2849
|
+
declare class AutoConnectionProvider implements IConnectionProvider {
|
|
2850
|
+
private readonly config;
|
|
2851
|
+
private readonly maxWsAttempts;
|
|
2852
|
+
/** The active underlying provider */
|
|
2853
|
+
private activeProvider;
|
|
2854
|
+
/** Whether we're using HTTP mode */
|
|
2855
|
+
private isHttpMode;
|
|
2856
|
+
private listeners;
|
|
2857
|
+
constructor(config: AutoConnectionProviderConfig);
|
|
2858
|
+
/**
|
|
2859
|
+
* Connect using WebSocket first, falling back to HTTP after maxWsAttempts failures.
|
|
2860
|
+
* If httpOnly is true, skips WebSocket entirely.
|
|
2861
|
+
*/
|
|
2862
|
+
connect(): Promise<void>;
|
|
2863
|
+
/**
|
|
2864
|
+
* Connect using HTTP sync provider.
|
|
2865
|
+
*/
|
|
2866
|
+
private connectHttp;
|
|
2867
|
+
getConnection(key: string): WebSocket;
|
|
2868
|
+
getAnyConnection(): WebSocket;
|
|
2869
|
+
isConnected(): boolean;
|
|
2870
|
+
getConnectedNodes(): string[];
|
|
2871
|
+
on(event: ConnectionProviderEvent, handler: ConnectionEventHandler): void;
|
|
2872
|
+
off(event: ConnectionProviderEvent, handler: ConnectionEventHandler): void;
|
|
2873
|
+
send(data: ArrayBuffer | Uint8Array, key?: string): void;
|
|
2874
|
+
/**
|
|
2875
|
+
* Close the active underlying provider.
|
|
2876
|
+
*/
|
|
2877
|
+
close(): Promise<void>;
|
|
2878
|
+
/**
|
|
2879
|
+
* Whether currently using HTTP mode.
|
|
2880
|
+
*/
|
|
2881
|
+
isUsingHttp(): boolean;
|
|
2882
|
+
/**
|
|
2883
|
+
* Proxy events from the underlying provider to our listeners.
|
|
2884
|
+
*/
|
|
2885
|
+
private proxyEvents;
|
|
2886
|
+
/**
|
|
2887
|
+
* Convert a URL to WebSocket URL format.
|
|
2888
|
+
*/
|
|
2889
|
+
private toWsUrl;
|
|
2890
|
+
/**
|
|
2891
|
+
* Convert a URL to HTTP URL format.
|
|
2892
|
+
*/
|
|
2893
|
+
private toHttpUrl;
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2765
2896
|
declare const logger: pino.Logger<never, boolean>;
|
|
2766
2897
|
|
|
2767
|
-
export { type BackoffConfig, type BackpressureConfig, BackpressureError, type BackpressureStatus, type BackpressureStrategy, type BackpressureThresholdEvent, type ChangeEvent, ChangeTracker, type CircuitState, ClusterClient, type ClusterClientEvents, type ClusterRoutingMode, ConflictResolverClient, type ConnectionEventHandler, ConnectionPool, type ConnectionPoolEvents, type ConnectionProviderEvent, type CursorStatus, DEFAULT_BACKPRESSURE_CONFIG, DEFAULT_CLUSTER_CONFIG, EncryptedStorageAdapter, EventJournalReader, type HeartbeatConfig, type HybridQueryFilter, HybridQueryHandle, type HybridResultItem, type HybridResultSource, type IConnectionProvider, IDBAdapter, type IStorageAdapter, type JournalEventData, type JournalSubscribeOptions, type OpLogEntry, type OperationDroppedEvent, PNCounterHandle, type PaginationInfo, PartitionRouter, type PartitionRouterEvents, type QueryFilter, QueryHandle, type QueryResultItem, type QueryResultSource, type RegisterResult, type ResolverInfo, type RoutingMetrics, type RoutingResult, SearchHandle, type SearchResult, type SearchResultsCallback, SingleServerProvider, type SingleServerProviderConfig, type StateChangeEvent, type StateChangeListener, SyncEngine, type SyncEngineConfig, SyncState, SyncStateMachine, type SyncStateMachineConfig, TopGun, TopGunClient, type TopGunClientConfig, type TopGunClusterConfig, type TopicCallback, TopicHandle, VALID_TRANSITIONS, isValidTransition, logger };
|
|
2898
|
+
export { AutoConnectionProvider, type AutoConnectionProviderConfig, type BackoffConfig, type BackpressureConfig, BackpressureError, type BackpressureStatus, type BackpressureStrategy, type BackpressureThresholdEvent, type ChangeEvent, ChangeTracker, type CircuitState, ClusterClient, type ClusterClientEvents, type ClusterRoutingMode, ConflictResolverClient, type ConnectionEventHandler, ConnectionPool, type ConnectionPoolEvents, type ConnectionProviderEvent, type CursorStatus, DEFAULT_BACKPRESSURE_CONFIG, DEFAULT_CLUSTER_CONFIG, EncryptedStorageAdapter, EventJournalReader, type HeartbeatConfig, HttpSyncProvider, type HttpSyncProviderConfig, type HybridQueryFilter, HybridQueryHandle, type HybridResultItem, type HybridResultSource, type IConnectionProvider, IDBAdapter, type IStorageAdapter, type JournalEventData, type JournalSubscribeOptions, type OpLogEntry, type OperationDroppedEvent, PNCounterHandle, type PaginationInfo, PartitionRouter, type PartitionRouterEvents, type QueryFilter, QueryHandle, type QueryResultItem, type QueryResultSource, type RegisterResult, type ResolverInfo, type RoutingMetrics, type RoutingResult, SearchHandle, type SearchResult, type SearchResultsCallback, SingleServerProvider, type SingleServerProviderConfig, type StateChangeEvent, type StateChangeListener, SyncEngine, type SyncEngineConfig, SyncState, SyncStateMachine, type SyncStateMachineConfig, TopGun, TopGunClient, type TopGunClientConfig, type TopGunClusterConfig, type TopicCallback, TopicHandle, VALID_TRANSITIONS, isValidTransition, logger };
|