@fluidframework/replay-driver 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212
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/api-extractor-lint.json +13 -0
- package/api-extractor.json +0 -4
- package/api-report/replay-driver.api.md +9 -9
- package/dist/replay-driver-alpha.d.ts +11 -144
- package/dist/replay-driver-beta.d.ts +31 -158
- package/dist/replay-driver-public.d.ts +31 -158
- package/dist/replay-driver-untrimmed.d.ts +19 -0
- package/dist/replayController.cjs +2 -0
- package/dist/replayController.cjs.map +1 -1
- package/dist/replayController.d.ts +2 -0
- package/dist/replayController.d.ts.map +1 -1
- package/dist/replayDocumentService.cjs +1 -0
- package/dist/replayDocumentService.cjs.map +1 -1
- package/dist/replayDocumentService.d.ts +1 -0
- package/dist/replayDocumentService.d.ts.map +1 -1
- package/dist/replayDocumentServiceFactory.cjs +3 -0
- package/dist/replayDocumentServiceFactory.cjs.map +1 -1
- package/dist/replayDocumentServiceFactory.d.ts +3 -0
- package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
- package/dist/storageImplementations.cjs +12 -0
- package/dist/storageImplementations.cjs.map +1 -1
- package/dist/storageImplementations.d.ts +13 -0
- package/dist/storageImplementations.d.ts.map +1 -1
- package/lib/replay-driver-alpha.d.ts +11 -144
- package/lib/replay-driver-beta.d.ts +31 -158
- package/lib/replay-driver-public.d.ts +31 -158
- package/lib/replay-driver-untrimmed.d.ts +19 -0
- package/lib/replayController.d.ts +2 -0
- package/lib/replayController.d.ts.map +1 -1
- package/lib/replayController.mjs +2 -0
- package/lib/replayController.mjs.map +1 -1
- package/lib/replayDocumentService.d.ts +1 -0
- package/lib/replayDocumentService.d.ts.map +1 -1
- package/lib/replayDocumentService.mjs +1 -0
- package/lib/replayDocumentService.mjs.map +1 -1
- package/lib/replayDocumentServiceFactory.d.ts +3 -0
- package/lib/replayDocumentServiceFactory.d.ts.map +1 -1
- package/lib/replayDocumentServiceFactory.mjs +3 -0
- package/lib/replayDocumentServiceFactory.mjs.map +1 -1
- package/lib/storageImplementations.d.ts +13 -0
- package/lib/storageImplementations.d.ts.map +1 -1
- package/lib/storageImplementations.mjs +12 -0
- package/lib/storageImplementations.mjs.map +1 -1
- package/package.json +9 -8
- package/src/replayController.ts +2 -0
- package/src/replayDocumentService.ts +1 -0
- package/src/replayDocumentServiceFactory.ts +3 -0
- package/src/storageImplementations.ts +13 -0
|
@@ -9,160 +9,27 @@ import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
|
9
9
|
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
10
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
11
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
12
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
13
|
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
|
|
18
|
-
protected docId?: string;
|
|
19
|
-
protected docTree: ISnapshotTree;
|
|
20
|
-
protected blobs: Map<string, ArrayBufferLike>;
|
|
21
|
-
protected readonly commits: {
|
|
22
|
-
[key: string]: ITree;
|
|
23
|
-
};
|
|
24
|
-
protected readonly trees: {
|
|
25
|
-
[key: string]: ISnapshotTree;
|
|
26
|
-
};
|
|
27
|
-
constructor(json: IFileSnapshot);
|
|
28
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
29
|
-
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
30
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
31
|
-
}
|
|
15
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
32
16
|
|
|
33
|
-
|
|
34
|
-
* Structure of snapshot on disk, when we store snapshot as single file
|
|
35
|
-
*/
|
|
36
|
-
export declare interface IFileSnapshot {
|
|
37
|
-
tree: ITree;
|
|
38
|
-
commits: {
|
|
39
|
-
[key: string]: ITree;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
17
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
42
18
|
|
|
43
|
-
|
|
44
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
45
|
-
getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
|
|
46
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
47
|
-
}
|
|
19
|
+
/* Excluded from this release type: ITelemetryLoggerExt */
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
* Partial implementation of IDocumentStorageService
|
|
51
|
-
*/
|
|
52
|
-
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
53
|
-
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
54
|
-
abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
55
|
-
abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
56
|
-
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
57
|
-
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
58
|
-
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
59
|
-
get repositoryUrl(): string;
|
|
60
|
-
}
|
|
21
|
+
/* Excluded from this release type: OpStorage */
|
|
61
22
|
|
|
62
|
-
|
|
63
|
-
* Replay controller object
|
|
64
|
-
* It controls where we start (snapshot, local file, no snapshots)
|
|
65
|
-
* As well as dispatch of ops
|
|
66
|
-
*/
|
|
67
|
-
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
68
|
-
/**
|
|
69
|
-
* Initialize reply controller
|
|
70
|
-
* @param documentService - the real document service
|
|
71
|
-
* @returns Whether or not the controller should be used.
|
|
72
|
-
* If `false` is returned, caller should fallback to original storage.
|
|
73
|
-
*/
|
|
74
|
-
abstract initStorage(documentService: IDocumentService): Promise<boolean>;
|
|
75
|
-
/**
|
|
76
|
-
* Returns sequence number to start processing ops
|
|
77
|
-
* Should be zero if not using snapshot, and snapshot seq# otherwise
|
|
78
|
-
*/
|
|
79
|
-
abstract getStartingOpSequence(): Promise<number>;
|
|
80
|
-
/**
|
|
81
|
-
* Returns last op number to fetch from current op
|
|
82
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
83
|
-
* @param currentOp - current op
|
|
84
|
-
*/
|
|
85
|
-
abstract fetchTo(currentOp: number): number | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Returns true if no more ops should be processed (or downloaded for future processing).
|
|
88
|
-
* It's called at end of each batch with latest op timestamp.
|
|
89
|
-
* Also it's called when there are no more ops available (lastTimeStamp === undefined).
|
|
90
|
-
* If false is returned and there are no more ops, request for more ops is made every 2 seconds.
|
|
91
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
92
|
-
* @param currentOp - current op
|
|
93
|
-
* @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
|
|
94
|
-
*/
|
|
95
|
-
abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Replay batch of ops
|
|
98
|
-
* NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
|
|
99
|
-
* @param emitter - callback to emit ops
|
|
100
|
-
* @param fetchedOps - ops to process
|
|
101
|
-
*/
|
|
102
|
-
abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
|
|
103
|
-
}
|
|
23
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
104
24
|
|
|
105
|
-
|
|
106
|
-
* The Replay document service dummies out the snapshot and the delta storage.
|
|
107
|
-
* Delta connection simulates the socket by fetching the ops from delta storage
|
|
108
|
-
* and emitting them with a pre determined delay
|
|
109
|
-
*/
|
|
110
|
-
export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
111
|
-
private readonly controller;
|
|
112
|
-
private readonly deltaStorage;
|
|
113
|
-
static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
|
|
114
|
-
constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
|
|
115
|
-
dispose(): void;
|
|
116
|
-
get resolvedUrl(): api_2.IResolvedUrl;
|
|
117
|
-
/**
|
|
118
|
-
* Connects to a storage endpoint for snapshot service and blobs.
|
|
119
|
-
* @returns returns the dummy document storage service for replay driver.
|
|
120
|
-
*/
|
|
121
|
-
connectToStorage(): Promise<api_2.IDocumentStorageService>;
|
|
122
|
-
/**
|
|
123
|
-
* Connects to a delta storage endpoint for getting ops between a range.
|
|
124
|
-
* @returns returns the dummy document delta storage service for replay driver.
|
|
125
|
-
*/
|
|
126
|
-
connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
|
|
127
|
-
/**
|
|
128
|
-
* Connects to a delta storage endpoint of provided documentService to get ops and then replaying
|
|
129
|
-
* them so as to mimic a delta stream endpoint.
|
|
130
|
-
* @param client - Client that connects to socket.
|
|
131
|
-
* @returns returns the delta stream service which replay ops from --from to --to arguments.
|
|
132
|
-
*/
|
|
133
|
-
connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
|
|
134
|
-
}
|
|
25
|
+
/* Excluded from this release type: ReplayController */
|
|
135
26
|
|
|
136
|
-
|
|
137
|
-
private readonly documentServiceFactory;
|
|
138
|
-
private readonly controller;
|
|
139
|
-
static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
|
|
140
|
-
constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
|
|
141
|
-
/**
|
|
142
|
-
* Creates a replay document service which uses the document service of provided
|
|
143
|
-
* documentServiceFactory for connecting to delta stream endpoint.
|
|
144
|
-
* @param resolvedUrl - URL to be used for connecting to endpoints.
|
|
145
|
-
* @returns returns the requested document service
|
|
146
|
-
*/
|
|
147
|
-
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
148
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
149
|
-
}
|
|
27
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
150
28
|
|
|
151
|
-
|
|
152
|
-
protected readonly storage: IDocumentStorageService;
|
|
153
|
-
protected readonly docTree: ISnapshotTree | null;
|
|
154
|
-
protected docId?: string;
|
|
155
|
-
constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
|
|
156
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
157
|
-
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
158
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
159
|
-
}
|
|
29
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
160
30
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
165
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
166
|
-
}
|
|
31
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
167
34
|
|
|
168
35
|
export { }
|
|
@@ -1,168 +1,41 @@
|
|
|
1
1
|
import * as api from '@fluidframework/protocol-definitions';
|
|
2
2
|
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
3
|
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
4
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
5
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
6
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
7
|
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Partial implementation of IDocumentStorageService
|
|
51
|
-
*/
|
|
52
|
-
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
53
|
-
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
54
|
-
abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
55
|
-
abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
56
|
-
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
57
|
-
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
58
|
-
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
59
|
-
get repositoryUrl(): string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Replay controller object
|
|
64
|
-
* It controls where we start (snapshot, local file, no snapshots)
|
|
65
|
-
* As well as dispatch of ops
|
|
66
|
-
*/
|
|
67
|
-
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
68
|
-
/**
|
|
69
|
-
* Initialize reply controller
|
|
70
|
-
* @param documentService - the real document service
|
|
71
|
-
* @returns Whether or not the controller should be used.
|
|
72
|
-
* If `false` is returned, caller should fallback to original storage.
|
|
73
|
-
*/
|
|
74
|
-
abstract initStorage(documentService: IDocumentService): Promise<boolean>;
|
|
75
|
-
/**
|
|
76
|
-
* Returns sequence number to start processing ops
|
|
77
|
-
* Should be zero if not using snapshot, and snapshot seq# otherwise
|
|
78
|
-
*/
|
|
79
|
-
abstract getStartingOpSequence(): Promise<number>;
|
|
80
|
-
/**
|
|
81
|
-
* Returns last op number to fetch from current op
|
|
82
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
83
|
-
* @param currentOp - current op
|
|
84
|
-
*/
|
|
85
|
-
abstract fetchTo(currentOp: number): number | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Returns true if no more ops should be processed (or downloaded for future processing).
|
|
88
|
-
* It's called at end of each batch with latest op timestamp.
|
|
89
|
-
* Also it's called when there are no more ops available (lastTimeStamp === undefined).
|
|
90
|
-
* If false is returned and there are no more ops, request for more ops is made every 2 seconds.
|
|
91
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
92
|
-
* @param currentOp - current op
|
|
93
|
-
* @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
|
|
94
|
-
*/
|
|
95
|
-
abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Replay batch of ops
|
|
98
|
-
* NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
|
|
99
|
-
* @param emitter - callback to emit ops
|
|
100
|
-
* @param fetchedOps - ops to process
|
|
101
|
-
*/
|
|
102
|
-
abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The Replay document service dummies out the snapshot and the delta storage.
|
|
107
|
-
* Delta connection simulates the socket by fetching the ops from delta storage
|
|
108
|
-
* and emitting them with a pre determined delay
|
|
109
|
-
*/
|
|
110
|
-
export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
111
|
-
private readonly controller;
|
|
112
|
-
private readonly deltaStorage;
|
|
113
|
-
static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
|
|
114
|
-
constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
|
|
115
|
-
dispose(): void;
|
|
116
|
-
get resolvedUrl(): api_2.IResolvedUrl;
|
|
117
|
-
/**
|
|
118
|
-
* Connects to a storage endpoint for snapshot service and blobs.
|
|
119
|
-
* @returns returns the dummy document storage service for replay driver.
|
|
120
|
-
*/
|
|
121
|
-
connectToStorage(): Promise<api_2.IDocumentStorageService>;
|
|
122
|
-
/**
|
|
123
|
-
* Connects to a delta storage endpoint for getting ops between a range.
|
|
124
|
-
* @returns returns the dummy document delta storage service for replay driver.
|
|
125
|
-
*/
|
|
126
|
-
connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
|
|
127
|
-
/**
|
|
128
|
-
* Connects to a delta storage endpoint of provided documentService to get ops and then replaying
|
|
129
|
-
* them so as to mimic a delta stream endpoint.
|
|
130
|
-
* @param client - Client that connects to socket.
|
|
131
|
-
* @returns returns the delta stream service which replay ops from --from to --to arguments.
|
|
132
|
-
*/
|
|
133
|
-
connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
137
|
-
private readonly documentServiceFactory;
|
|
138
|
-
private readonly controller;
|
|
139
|
-
static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
|
|
140
|
-
constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
|
|
141
|
-
/**
|
|
142
|
-
* Creates a replay document service which uses the document service of provided
|
|
143
|
-
* documentServiceFactory for connecting to delta stream endpoint.
|
|
144
|
-
* @param resolvedUrl - URL to be used for connecting to endpoints.
|
|
145
|
-
* @returns returns the requested document service
|
|
146
|
-
*/
|
|
147
|
-
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
148
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
152
|
-
protected readonly storage: IDocumentStorageService;
|
|
153
|
-
protected readonly docTree: ISnapshotTree | null;
|
|
154
|
-
protected docId?: string;
|
|
155
|
-
constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
|
|
156
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
157
|
-
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
158
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
162
|
-
protected readonly storage: IDocumentStorageService;
|
|
163
|
-
constructor(storage: IDocumentStorageService);
|
|
164
|
-
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
165
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
166
|
-
}
|
|
9
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: IDocumentService */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: IDocumentServiceFactory */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IDocumentStorageService */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: ISummaryContext */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: ITelemetryBaseLogger */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: ITelemetryLoggerExt */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: OpStorage */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: ReplayController */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
167
40
|
|
|
168
41
|
export { }
|
|
@@ -1,168 +1,41 @@
|
|
|
1
1
|
import * as api from '@fluidframework/protocol-definitions';
|
|
2
2
|
import * as api_2 from '@fluidframework/driver-definitions';
|
|
3
3
|
import { IClient } from '@fluidframework/protocol-definitions';
|
|
4
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
5
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
6
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
7
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
8
4
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
9
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
10
5
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
11
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
13
6
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
7
|
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Partial implementation of IDocumentStorageService
|
|
51
|
-
*/
|
|
52
|
-
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
53
|
-
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
54
|
-
abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
|
|
55
|
-
abstract readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
56
|
-
uploadSummaryWithContext(summary: api.ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
57
|
-
createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse>;
|
|
58
|
-
downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree>;
|
|
59
|
-
get repositoryUrl(): string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Replay controller object
|
|
64
|
-
* It controls where we start (snapshot, local file, no snapshots)
|
|
65
|
-
* As well as dispatch of ops
|
|
66
|
-
*/
|
|
67
|
-
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
68
|
-
/**
|
|
69
|
-
* Initialize reply controller
|
|
70
|
-
* @param documentService - the real document service
|
|
71
|
-
* @returns Whether or not the controller should be used.
|
|
72
|
-
* If `false` is returned, caller should fallback to original storage.
|
|
73
|
-
*/
|
|
74
|
-
abstract initStorage(documentService: IDocumentService): Promise<boolean>;
|
|
75
|
-
/**
|
|
76
|
-
* Returns sequence number to start processing ops
|
|
77
|
-
* Should be zero if not using snapshot, and snapshot seq# otherwise
|
|
78
|
-
*/
|
|
79
|
-
abstract getStartingOpSequence(): Promise<number>;
|
|
80
|
-
/**
|
|
81
|
-
* Returns last op number to fetch from current op
|
|
82
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
83
|
-
* @param currentOp - current op
|
|
84
|
-
*/
|
|
85
|
-
abstract fetchTo(currentOp: number): number | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Returns true if no more ops should be processed (or downloaded for future processing).
|
|
88
|
-
* It's called at end of each batch with latest op timestamp.
|
|
89
|
-
* Also it's called when there are no more ops available (lastTimeStamp === undefined).
|
|
90
|
-
* If false is returned and there are no more ops, request for more ops is made every 2 seconds.
|
|
91
|
-
* Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel
|
|
92
|
-
* @param currentOp - current op
|
|
93
|
-
* @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.
|
|
94
|
-
*/
|
|
95
|
-
abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Replay batch of ops
|
|
98
|
-
* NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights
|
|
99
|
-
* @param emitter - callback to emit ops
|
|
100
|
-
* @param fetchedOps - ops to process
|
|
101
|
-
*/
|
|
102
|
-
abstract replay(emitter: (op: api.ISequencedDocumentMessage[]) => void, fetchedOps: api.ISequencedDocumentMessage[]): Promise<void>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The Replay document service dummies out the snapshot and the delta storage.
|
|
107
|
-
* Delta connection simulates the socket by fetching the ops from delta storage
|
|
108
|
-
* and emitting them with a pre determined delay
|
|
109
|
-
*/
|
|
110
|
-
export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
111
|
-
private readonly controller;
|
|
112
|
-
private readonly deltaStorage;
|
|
113
|
-
static create(documentService: api_2.IDocumentService, controller: ReplayController): Promise<api_2.IDocumentService>;
|
|
114
|
-
constructor(controller: api_2.IDocumentStorageService, deltaStorage: api_2.IDocumentDeltaConnection);
|
|
115
|
-
dispose(): void;
|
|
116
|
-
get resolvedUrl(): api_2.IResolvedUrl;
|
|
117
|
-
/**
|
|
118
|
-
* Connects to a storage endpoint for snapshot service and blobs.
|
|
119
|
-
* @returns returns the dummy document storage service for replay driver.
|
|
120
|
-
*/
|
|
121
|
-
connectToStorage(): Promise<api_2.IDocumentStorageService>;
|
|
122
|
-
/**
|
|
123
|
-
* Connects to a delta storage endpoint for getting ops between a range.
|
|
124
|
-
* @returns returns the dummy document delta storage service for replay driver.
|
|
125
|
-
*/
|
|
126
|
-
connectToDeltaStorage(): Promise<api_2.IDocumentDeltaStorageService>;
|
|
127
|
-
/**
|
|
128
|
-
* Connects to a delta storage endpoint of provided documentService to get ops and then replaying
|
|
129
|
-
* them so as to mimic a delta stream endpoint.
|
|
130
|
-
* @param client - Client that connects to socket.
|
|
131
|
-
* @returns returns the delta stream service which replay ops from --from to --to arguments.
|
|
132
|
-
*/
|
|
133
|
-
connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
137
|
-
private readonly documentServiceFactory;
|
|
138
|
-
private readonly controller;
|
|
139
|
-
static create(from: number, to: number, documentServiceFactory: IDocumentServiceFactory): ReplayDocumentServiceFactory;
|
|
140
|
-
constructor(documentServiceFactory: IDocumentServiceFactory, controller: ReplayController);
|
|
141
|
-
/**
|
|
142
|
-
* Creates a replay document service which uses the document service of provided
|
|
143
|
-
* documentServiceFactory for connecting to delta stream endpoint.
|
|
144
|
-
* @param resolvedUrl - URL to be used for connecting to endpoints.
|
|
145
|
-
* @returns returns the requested document service
|
|
146
|
-
*/
|
|
147
|
-
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
148
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
152
|
-
protected readonly storage: IDocumentStorageService;
|
|
153
|
-
protected readonly docTree: ISnapshotTree | null;
|
|
154
|
-
protected docId?: string;
|
|
155
|
-
constructor(storage: IDocumentStorageService, docTree: ISnapshotTree | null);
|
|
156
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
157
|
-
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
158
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
162
|
-
protected readonly storage: IDocumentStorageService;
|
|
163
|
-
constructor(storage: IDocumentStorageService);
|
|
164
|
-
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
165
|
-
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
166
|
-
}
|
|
9
|
+
/* Excluded from this release type: FileSnapshotReader */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: IDocumentService */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: IDocumentServiceFactory */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: IDocumentStorageService */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: IFileSnapshot */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: IResolvedUrl */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: ISummaryContext */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: ITelemetryBaseLogger */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: ITelemetryLoggerExt */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: OpStorage */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: ReadDocumentStorageServiceBase */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: ReplayController */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: ReplayDocumentService */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: ReplayDocumentServiceFactory */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: SnapshotStorage */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: StaticStorageDocumentServiceFactory */
|
|
167
40
|
|
|
168
41
|
export { }
|
|
@@ -13,6 +13,9 @@ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
|
13
13
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
14
14
|
import { IVersion } from '@fluidframework/protocol-definitions';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
16
19
|
export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
17
20
|
protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";
|
|
18
21
|
protected docId?: string;
|
|
@@ -32,6 +35,7 @@ export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase i
|
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
* Structure of snapshot on disk, when we store snapshot as single file
|
|
38
|
+
* @internal
|
|
35
39
|
*/
|
|
36
40
|
export declare interface IFileSnapshot {
|
|
37
41
|
tree: ITree;
|
|
@@ -40,6 +44,9 @@ export declare interface IFileSnapshot {
|
|
|
40
44
|
};
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
43
50
|
export declare class OpStorage extends ReadDocumentStorageServiceBase {
|
|
44
51
|
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
45
52
|
getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
|
|
@@ -48,6 +55,7 @@ export declare class OpStorage extends ReadDocumentStorageServiceBase {
|
|
|
48
55
|
|
|
49
56
|
/**
|
|
50
57
|
* Partial implementation of IDocumentStorageService
|
|
58
|
+
* @internal
|
|
51
59
|
*/
|
|
52
60
|
export declare abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
53
61
|
abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;
|
|
@@ -63,6 +71,7 @@ export declare abstract class ReadDocumentStorageServiceBase implements IDocumen
|
|
|
63
71
|
* Replay controller object
|
|
64
72
|
* It controls where we start (snapshot, local file, no snapshots)
|
|
65
73
|
* As well as dispatch of ops
|
|
74
|
+
* @internal
|
|
66
75
|
*/
|
|
67
76
|
export declare abstract class ReplayController extends ReadDocumentStorageServiceBase {
|
|
68
77
|
/**
|
|
@@ -106,6 +115,7 @@ export declare abstract class ReplayController extends ReadDocumentStorageServic
|
|
|
106
115
|
* The Replay document service dummies out the snapshot and the delta storage.
|
|
107
116
|
* Delta connection simulates the socket by fetching the ops from delta storage
|
|
108
117
|
* and emitting them with a pre determined delay
|
|
118
|
+
* @internal
|
|
109
119
|
*/
|
|
110
120
|
export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
111
121
|
private readonly controller;
|
|
@@ -133,6 +143,9 @@ export declare class ReplayDocumentService implements api_2.IDocumentService {
|
|
|
133
143
|
connectToDeltaStream(client: IClient): Promise<api_2.IDocumentDeltaConnection>;
|
|
134
144
|
}
|
|
135
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
136
149
|
export declare class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
137
150
|
private readonly documentServiceFactory;
|
|
138
151
|
private readonly controller;
|
|
@@ -148,6 +161,9 @@ export declare class ReplayDocumentServiceFactory implements IDocumentServiceFac
|
|
|
148
161
|
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
149
162
|
}
|
|
150
163
|
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
151
167
|
export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
152
168
|
protected readonly storage: IDocumentStorageService;
|
|
153
169
|
protected readonly docTree: ISnapshotTree | null;
|
|
@@ -158,6 +174,9 @@ export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
|
158
174
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
159
175
|
}
|
|
160
176
|
|
|
177
|
+
/**
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
161
180
|
export declare class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {
|
|
162
181
|
protected readonly storage: IDocumentStorageService;
|
|
163
182
|
constructor(storage: IDocumentStorageService);
|