IRuntime Interface
Packages > @fluidframework/container-definitions > IRuntime
The IRuntime represents an instantiation of a code package within a Container. Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here .
Signature
export interface IRuntime extends IDisposable
Extends: IDisposable
Methods
Method | Alerts | Modifiers | Return Type | Description |
---|---|---|---|---|
createSummary(blobRedirectTable) | Alpha |
ISummaryTree | Create a summary. Used when attaching or serializing a detached container. | |
getEntryPoint() | Alpha |
Promise<FluidObject> | Exposes the entryPoint for the container runtime. Use this as the primary way of getting access to the user-defined logic within the container runtime. | |
getPendingLocalState(props) | Alpha |
unknown | Get pending local state in a serializable format to be given back to a newly loaded container | |
notifyOpReplay(message) | Alpha |
optional |
Promise<void> | Notify runtime that we have processed a saved message, so that it can do async work (applying stashed ops) after having processed it. |
process(message, local) | Alpha |
any | Processes the given op (message) | |
processSignal(message, local) | Alpha |
any | Processes the given signal | |
setAttachState(attachState) | Alpha |
void | Propagate the container state when container is attaching or attached. | |
setConnectionState(connected, clientId) | Alpha |
any | Notifies the runtime of a change in the connection state |
Method Details
createSummary
Create a summary. Used when attaching or serializing a detached container.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
createSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
blobRedirectTable | optional | Map<string, string> | A table passed during the attach process. While detached, blob upload is supported using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the new storage IDs so requests can be redirected. |
Returns
Return type: ISummaryTree
getEntryPoint
Exposes the entryPoint for the container runtime. Use this as the primary way of getting access to the user-defined logic within the container runtime.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
getEntryPoint(): Promise<FluidObject>;
Returns
Return type: Promise<FluidObject >
See Also
getPendingLocalState
Get pending local state in a serializable format to be given back to a newly loaded container
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
getPendingLocalState(props?: IGetPendingLocalStateProps): unknown;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
props | optional | IGetPendingLocalStateProps |
Returns
Return type: unknown
notifyOpReplay
Notify runtime that we have processed a saved message, so that it can do async work (applying stashed ops) after having processed it.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
notifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
message | ISequencedDocumentMessage |
Returns
Return type: Promise<void>
process
Processes the given op (message)
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
process(message: ISequencedDocumentMessage, local: boolean): any;
Parameters
Parameter | Type | Description |
---|---|---|
message | ISequencedDocumentMessage | delta message received from the server |
local | boolean | true if the message was originally generated by the client receiving it. |
Returns
Return type: any
processSignal
Processes the given signal
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
processSignal(message: any, local: boolean): any;
Parameters
Parameter | Type | Description |
---|---|---|
message | any | |
local | boolean |
Returns
Return type: any
setAttachState
Propagate the container state when container is attaching or attached.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
Parameters
Parameter | Type | Description |
---|---|---|
attachState | AttachState.Attaching | AttachState.Attached | State of the container. |
setConnectionState
Notifies the runtime of a change in the connection state
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here .
Signature
setConnectionState(connected: boolean, clientId?: string): any;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
connected | boolean | ||
clientId | optional | string |
Returns
Return type: any