DocumentService Class

Packages > @fluidframework/routerlicious-driver > DocumentService

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

List of constructors for this class
Constructor Modifiers Description
(constructor)(resolvedUrl, ordererUrl, deltaStorageUrl, gitUrl, errorTracking, disableCache, historianApi, directCredentials, gitCache, tokenProvider, tenantId, documentId) Constructs a new instance of the DocumentService class

Properties

List of properties for this class
Property Modifiers Type Description
documentId string
ordererUrl string
resolvedUrl api.IResolvedUrl
tenantId string
tokenProvider ITokenProvider

Methods

List of methods on this class
Method Modifiers Description
connectToDeltaStorage() Connects to a delta storage endpoint for getting ops between a range.
connectToDeltaStream(client) Connects to a delta stream endpoint for emitting ops.
connectToStorage() Connects to a storage endpoint for snapshot service.
getErrorTrackingService()

Constructors

DocumentService.(constructor)

Constructs a new instance of the DocumentService class

Signature:

constructor(resolvedUrl: api.IResolvedUrl, ordererUrl: string, deltaStorageUrl: string, gitUrl: string, errorTracking: IErrorTrackingService, disableCache: boolean, historianApi: boolean, directCredentials: ICredentials | undefined, gitCache: IGitCache | undefined, tokenProvider: ITokenProvider, tenantId: string, documentId: string);

Parameters

List of parameters
Parameter Type Description
resolvedUrl api.IResolvedUrl
ordererUrl string
deltaStorageUrl string
gitUrl string
errorTracking IErrorTrackingService
disableCache boolean
historianApi boolean
directCredentials ICredentials | undefined
gitCache IGitCache | undefined
tokenProvider ITokenProvider
tenantId string
documentId string

Properties

documentId

Signature:

protected documentId: string;

ordererUrl

Signature:

protected ordererUrl: string;

resolvedUrl

Signature:

readonly resolvedUrl: api.IResolvedUrl;

tenantId

Signature:

protected tenantId: string;

tokenProvider

Signature:

protected tokenProvider: ITokenProvider;

Methods

connectToDeltaStorage

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

Signature:

connectToDeltaStorage(): Promise<api.IDocumentDeltaStorageService>;

Returns:

Promise<api.IDocumentDeltaStorageService>

returns the document delta storage service for routerlicious driver.

connectToDeltaStream

Connects to a delta stream endpoint for emitting ops.

Signature:

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

Parameters

List of parameters
Parameter Type Description
client IClient

Returns:

Promise<api.IDocumentDeltaConnection>

returns the document delta stream service for routerlicious driver.

connectToStorage

Connects to a storage endpoint for snapshot service.

Signature:

connectToStorage(): Promise<api.IDocumentStorageService>;

Returns:

Promise<api.IDocumentStorageService>

returns the document storage service for routerlicious driver.

getErrorTrackingService

Signature:

getErrorTrackingService(): IErrorTrackingService;

Returns:

IErrorTrackingService