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

Property Type Description
clientDetails IClientDetails
logger ITelemetryBaseLogger

Methods

Method Alerts Return Type Description
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) IFluidDataStoreContextDetached Creates 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() IAudience Returns the current audience.
getQuorum() IQuorumClients Returns the current quorum.
orderSequentially(callback) void 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.
request(request) Promise<IResponse> Executes a request against the container runtime
setFlushMode(mode) Deprecated void Sets the flush mode for operations on the document.
submitSignal(type, content) void Submits 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

Parameter Type Description
pkg string | 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

Parameter Type Description
pkg Readonly<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

Parameter Type Description
relativeUrl string A 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

Parameter Type Description
callback () => void

request

Executes a request against the container runtime

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

Parameters

Parameter Type Description
request IRequest

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

Parameter Type Description
mode FlushMode

submitSignal

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

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

Parameters

Parameter Type Description
type string Type of the signal.
content any Content of the signal.

uploadBlob

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

Parameters

Parameter Type Description
blob ArrayBufferLike

Returns

Return type: Promise<IFluidHandle<ArrayBufferLike>>