IContainerContext Interface
IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the loader layer. It gets passed into the instantiateRuntime(context, existing) call.
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IContainerContext
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
attachState | Alpha |
readonly |
AttachState | Indicates the attachment state of the container to a host service. |
audience | Alpha |
readonly |
IAudience | |
baseSnapshot | Alpha |
readonly |
ISnapshotTree | undefined | |
clientDetails | Alpha |
readonly |
IClientDetails | |
clientId | Alpha |
readonly |
string | undefined | |
closeFn | Alpha |
readonly |
(error?: ICriticalContainerError) => void | |
connected | Alpha |
readonly |
boolean | |
deltaManager | Alpha |
readonly |
IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> | |
disposeFn | Alpha |
optional , readonly |
(error?: ICriticalContainerError) => void | |
id | Deprecated , Alpha |
readonly |
string | WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers and scenarios which can change in the future. |
loader | Alpha |
readonly |
ILoader | |
options | Alpha |
readonly |
Record<string | number, any> | Not recommended for general use, is used in some cases to control various runtime behaviors. |
pendingLocalState | Alpha |
optional |
unknown | |
quorum | Alpha |
readonly |
IQuorumClients | |
scope | Alpha |
readonly |
FluidObject | Ambient services provided with the context |
snapshotWithContents | Alpha |
optional , readonly |
ISnapshot | This contains all parts of a snapshot like blobContents, ops etc. |
storage | Alpha |
readonly |
IDocumentStorageService | |
submitBatchFn | Alpha |
readonly |
(batch: IBatchMessage[], referenceSequenceNumber?: number) => number | |
submitFn | Deprecated , Alpha |
readonly |
(type: MessageType, contents: any, batch: boolean, appData?: any) => number | |
submitSignalFn | Alpha |
readonly |
(contents: unknown, targetClientId?: string) => void | |
submitSummaryFn | Alpha |
readonly |
(summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number | |
supportedFeatures | Deprecated , Alpha |
optional , readonly |
ReadonlyMap<string, unknown> | |
taggedLogger | Alpha |
readonly |
ITelemetryBaseLogger |
Methods
Method | Alerts | Modifiers | Return Type | Description |
---|---|---|---|---|
getAbsoluteUrl(relativeUrl) | Alpha |
optional |
Promise<string | undefined> | Get an absolute url for a provided container-relative request. |
getLoadedFromVersion() | Alpha |
IVersion | undefined | ||
updateDirtyContainerState(dirty) | Alpha |
void |
Property Details
attachState
Indicates the attachment state of the container to a host service.
For more information about our API support guarantees, see here.
Signature
readonly attachState: AttachState;
Type: AttachState
audience
For more information about our API support guarantees, see here.
Signature
readonly audience: IAudience;
Type: IAudience
baseSnapshot
For more information about our API support guarantees, see here.
Signature
readonly baseSnapshot: ISnapshotTree | undefined;
Type: ISnapshotTree | undefined
clientDetails
For more information about our API support guarantees, see here.
Signature
readonly clientDetails: IClientDetails;
Type: IClientDetails
clientId
For more information about our API support guarantees, see here.
Signature
readonly clientId: string | undefined;
Type: string | undefined
closeFn
For more information about our API support guarantees, see here.
Signature
readonly closeFn: (error?: ICriticalContainerError) => void;
Type: (error?: ICriticalContainerError) => void
connected
For more information about our API support guarantees, see here.
Signature
readonly connected: boolean;
Type: boolean
deltaManager
For more information about our API support guarantees, see here.
Signature
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
disposeFn
For more information about our API support guarantees, see here.
Signature
readonly disposeFn?: (error?: ICriticalContainerError) => void;
Type: (error?: ICriticalContainerError) => void
id
WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers and scenarios which can change in the future.
2.0.0-internal.5.2.0 - The docId is already logged by the taggedLogger for telemetry purposes, so this is generally unnecessary for telemetry. If the id is needed for other purposes it should be passed to the consumer explicitly.
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
loader
For more information about our API support guarantees, see here.
Signature
readonly loader: ILoader;
Type: ILoader
options
Not recommended for general use, is used in some cases to control various runtime behaviors.
For more information about our API support guarantees, see here.
Signature
readonly options: Record<string | number, any>;
Type: Record<string | number, any>
Remarks
Used to be ILoaderOptions, this is staging for eventual removal.
pendingLocalState
For more information about our API support guarantees, see here.
Signature
pendingLocalState?: unknown;
Type: unknown
quorum
For more information about our API support guarantees, see here.
Signature
readonly quorum: IQuorumClients;
Type: IQuorumClients
scope
Ambient services provided with the context
For more information about our API support guarantees, see here.
Signature
readonly scope: FluidObject;
Type: FluidObject
snapshotWithContents
This contains all parts of a snapshot like blobContents, ops etc.
For more information about our API support guarantees, see here.
Signature
readonly snapshotWithContents?: ISnapshot;
Type: ISnapshot
storage
For more information about our API support guarantees, see here.
Signature
readonly storage: IDocumentStorageService;
Type: IDocumentStorageService
submitBatchFn
For more information about our API support guarantees, see here.
Signature
readonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;
Type: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number
submitFn
Please use submitBatchFn & submitSummaryFn
For more information about our API support guarantees, see here.
Signature
readonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;
Type: (type: MessageType, contents: any, batch: boolean, appData?: any) => number
submitSignalFn
For more information about our API support guarantees, see here.
Signature
readonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;
Type: (contents: unknown, targetClientId?: string) => void
submitSummaryFn
For more information about our API support guarantees, see here.
Signature
readonly submitSummaryFn: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number;
Type: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number
supportedFeatures
- This has been deprecated. It was used internally and there is no replacement.
For more information about our API support guarantees, see here.
Signature
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
Type: ReadonlyMap<string, unknown>
taggedLogger
For more information about our API support guarantees, see here.
Signature
readonly taggedLogger: ITelemetryBaseLogger;
Type: ITelemetryBaseLogger
Method Details
getAbsoluteUrl
Get an absolute url for a provided container-relative request.
For more information about our API support guarantees, see here.
Signature
getAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
relativeUrl | string |
A relative request within the container TODO: Optional for backwards compatibility. Make non-optional in version 0.19 |
Returns
Return type: Promise<string | undefined>
getLoadedFromVersion
For more information about our API support guarantees, see here.
Signature
getLoadedFromVersion(): IVersion | undefined;
Returns
Return type: IVersion | undefined
updateDirtyContainerState
For more information about our API support guarantees, see here.
Signature
updateDirtyContainerState(dirty: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
dirty | boolean |