Skip to main content
Version: v1

IContainerRuntimeBase Interface

A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need TODO: this should be merged into IFluidDataStoreContext

Signature

export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents>, IProvideFluidHandleContext

Extends: IEventProvider<IContainerRuntimeBaseEvents>, IProvideFluidHandleContext

Properties

PropertyTypeDescription
clientDetailsIClientDetails
loggerITelemetryBaseLogger

Methods

MethodAlertsReturn TypeDescription
createDataStore(pkg)Promise<IDataStore>Creates data store. Returns router of data store. Data store is not bound to container, store in such state is not persisted to storage (file). Storing a handle to this store (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually gets attached to storage) will result in this store being attached to storage.
createDetachedDataStore(pkg)IFluidDataStoreContextDetachedCreates detached data store context. Only after context.attachRuntime() is called, data store initialization is considered complete.
getAbsoluteUrl(relativeUrl)Promise<string | undefined>Get an absolute url for a provided container-relative request. Returns undefined if the container or data store isn't attached to storage.
getAudience()IAudienceReturns the current audience.
getQuorum()IQuorumClientsReturns the current quorum.
orderSequentially(callback)voidInvokes the given callback and guarantees that all operations generated within the callback will be ordered sequentially. Total size of all messages must be less than maxOpSize.
request(request)Promise<IResponse>Executes a request against the container runtime
setFlushMode(mode)DeprecatedvoidSets the flush mode for operations on the document.
submitSignal(type, content)voidSubmits a container runtime level signal to be sent to other clients.
uploadBlob(blob)Promise<IFluidHandle<ArrayBufferLike>>

Property Details

clientDetails

Signature

readonly clientDetails: IClientDetails;

Type: IClientDetails

logger

Signature

readonly logger: ITelemetryBaseLogger;

Type: ITelemetryBaseLogger

Method Details

createDataStore

Creates data store. Returns router of data store. Data store is not bound to container, store in such state is not persisted to storage (file). Storing a handle to this store (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually gets attached to storage) will result in this store being attached to storage.

Signature

createDataStore(pkg: string | string[]): Promise<IDataStore>;

Parameters

ParameterTypeDescription
pkgstring | string[]Package name of the data store factory

Returns

Return type: Promise<IDataStore>

createDetachedDataStore

Creates detached data store context. Only after context.attachRuntime() is called, data store initialization is considered complete.

Signature

createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;

Parameters

ParameterTypeDescription
pkgReadonly<string[]>

Returns

Return type: IFluidDataStoreContextDetached

getAbsoluteUrl

Get an absolute url for a provided container-relative request. Returns undefined if the container or data store isn't attached to storage.

Signature

getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;

Parameters

ParameterTypeDescription
relativeUrlstringA relative request within the container

Returns

Return type: Promise<string | undefined>

getAudience

Returns the current audience.

Signature

getAudience(): IAudience;

Returns

Return type: IAudience

getQuorum

Returns the current quorum.

Signature

getQuorum(): IQuorumClients;

Returns

Return type: IQuorumClients

orderSequentially

Invokes the given callback and guarantees that all operations generated within the callback will be ordered sequentially. Total size of all messages must be less than maxOpSize.

Signature

orderSequentially(callback: () => void): void;

Parameters

ParameterTypeDescription
callback() => void

request

Executes a request against the container runtime

Signature

request(request: IRequest): Promise<IResponse>;

Parameters

ParameterTypeDescription
requestIRequest

Returns

Return type: Promise<IResponse>

setFlushMode

Sets the flush mode for operations on the document.

This API is deprecated and will be removed in a future release.
  • Will be removed in 0.60. See #9480.

Signature

setFlushMode(mode: FlushMode): void;

Parameters

ParameterTypeDescription
modeFlushMode

submitSignal

Submits a container runtime level signal to be sent to other clients.

Signature

submitSignal(type: string, content: any): void;

Parameters

ParameterTypeDescription
typestringType of the signal.
contentanyContent of the signal.

uploadBlob

Signature

uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;

Parameters

ParameterTypeDescription
blobArrayBufferLike

Returns

Return type: Promise<IFluidHandle<ArrayBufferLike>>