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 | 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.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly attachState: AttachState;
Type: AttachState
audience
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly audience: IAudience;
Type: IAudience
baseSnapshot
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly baseSnapshot: ISnapshotTree | undefined;
Type: ISnapshotTree | undefined
clientDetails
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly clientDetails: IClientDetails;
Type: IClientDetails
clientId
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly clientId: string | undefined;
Type: string | undefined
closeFn
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly closeFn: (error?: ICriticalContainerError) => void;
Type: (error?: ICriticalContainerError) => void
connected
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly connected: boolean;
Type: boolean
deltaManager
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
Type: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
disposeFn
To use, import via @fluidframework/container-definitions/alpha
.
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.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly id: string;
Type: string
loader
To use, import via @fluidframework/container-definitions/alpha
.
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.
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
pendingLocalState?: unknown;
Type: unknown
quorum
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly quorum: IQuorumClients;
Type: IQuorumClients
scope
Ambient services provided with the context
To use, import via @fluidframework/container-definitions/alpha
.
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.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly snapshotWithContents?: ISnapshot;
Type: ISnapshot
storage
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly storage: IDocumentStorageService;
Type: IDocumentStorageService
submitBatchFn
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
Type: ReadonlyMap<string, unknown>
taggedLogger
To use, import via @fluidframework/container-definitions/alpha
.
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.
To use, import via @fluidframework/container-definitions/alpha
.
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
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
getLoadedFromVersion(): IVersion | undefined;
Returns
Return type: IVersion | undefined
updateDirtyContainerState
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
updateDirtyContainerState(dirty: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
dirty | boolean |