Skip to main content
Version: v1

DocumentService Class

The DocumentService manages the Socket.IO connection and manages routing requests to connected clients.

Signature

export declare class DocumentService implements api.IDocumentService

Implements: api.IDocumentService

Constructors

ConstructorDescription
(constructor)(_resolvedUrl, ordererUrl, deltaStorageUrl, storageUrl, logger, tokenProvider, tenantId, documentId, driverPolicies, blobCache, snapshotTreeCache, discoverFluidResolvedUrl)Constructs a new instance of the DocumentService class

Properties

PropertyTypeDescription
documentIdstring
ordererUrlstring
resolvedUrlapi.IResolvedUrl
tenantIdstring
tokenProviderITokenProvider

Methods

MethodReturn TypeDescription
connectToDeltaStorage()Promise<api.IDocumentDeltaStorageService>Connects to a delta storage endpoint for getting ops between a range.
connectToDeltaStream(client)Promise<api.IDocumentDeltaConnection>Connects to a delta stream endpoint for emitting ops.
connectToStorage()Promise<api.IDocumentStorageService>Connects to a storage endpoint for snapshot service.
dispose()void

Constructor Details

(constructor)

Constructs a new instance of the DocumentService class

Signature

constructor(_resolvedUrl: api.IResolvedUrl, ordererUrl: string, deltaStorageUrl: string, storageUrl: string, logger: ITelemetryLogger, tokenProvider: ITokenProvider, tenantId: string, documentId: string, driverPolicies: IRouterliciousDriverPolicies, blobCache: ICache<ArrayBufferLike>, snapshotTreeCache: ICache<ISnapshotTreeVersion>, discoverFluidResolvedUrl: () => Promise<api.IFluidResolvedUrl>);

Parameters

ParameterTypeDescription
_resolvedUrlapi.IResolvedUrl
ordererUrlstring
deltaStorageUrlstring
storageUrlstring
loggerITelemetryLogger
tokenProviderITokenProvider
tenantIdstring
documentIdstring
driverPoliciesIRouterliciousDriverPolicies
blobCacheICache<ArrayBufferLike>
snapshotTreeCacheICache<ISnapshotTreeVersion>
discoverFluidResolvedUrl() => Promise<api.IFluidResolvedUrl>

Property Details

documentId

Signature

protected documentId: string;

Type: string

ordererUrl

Signature

protected ordererUrl: string;

Type: string

resolvedUrl

Signature

get resolvedUrl(): api.IResolvedUrl;

Type: api.IResolvedUrl

tenantId

Signature

protected tenantId: string;

Type: string

tokenProvider

Signature

protected tokenProvider: ITokenProvider;

Type: ITokenProvider

Method Details

connectToDeltaStorage

Connects to a delta storage endpoint for getting ops between a range.

Signature

connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService>;

Returns

returns the document delta storage service for routerlicious driver.

Return type: Promise<api.IDocumentDeltaStorageService>

connectToDeltaStream

Connects to a delta stream endpoint for emitting ops.

Signature

connectToDeltaStream(client: IClient): Promise<api.IDocumentDeltaConnection>;

Parameters

ParameterTypeDescription
clientIClient

Returns

returns the document delta stream service for routerlicious driver.

Return type: Promise<api.IDocumentDeltaConnection>

connectToStorage

Connects to a storage endpoint for snapshot service.

Signature

connectToStorage(): Promise<api.IDocumentStorageService>;

Returns

returns the document storage service for routerlicious driver.

Return type: Promise<api.IDocumentStorageService>

dispose

Signature

dispose(): void;