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.
Signature:
export interface IRuntime extends IDisposable
Extends: IDisposable
Properties
Property | Type | Description |
---|---|---|
changeConnectionState | (value: ConnectionState, clientId?: string) => void | Deprecated: Back-compat, supporting 0.16 data stores and earlier |
runtimeVersion | string |
Methods
Method | Description |
---|---|
createSummary() | |
process(message, local, context) | Processes the given op (message) |
processSignal(message, local) | Processes the given signal |
request(request) | Executes a request against the runtime |
setAttachState(attachState) | Propagate the container state when container is attaching or attached. |
setConnectionState(connected, clientId) | Notifies the runtime of a change in the connection state |
snapshot(tagMessage, fullTree) | Snapshots the runtime |
stop() |
Events
changeConnectionState
Deprecated: Back-compat, supporting 0.16 data stores and earlier
Signature:
changeConnectionState?: (value: ConnectionState, clientId?: string) => void;
runtimeVersion
Signature:
readonly runtimeVersion?: string;
Methods
createSummary
Signature:
createSummary(): ISummaryTree;
Returns:
process
Processes the given op (message)
Signature:
process(message: ISequencedDocumentMessage, local: boolean, context: any): any;
Parameters
Parameter | Type | Description |
---|---|---|
message | ISequencedDocumentMessage | |
local | boolean | |
context | any |
Returns:
any
processSignal
Processes the given signal
Signature:
processSignal(message: any, local: boolean): any;
Parameters
Parameter | Type | Description |
---|---|---|
message | any | |
local | boolean |
Returns:
any
request
Executes a request against the runtime
Signature:
request(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest |
Returns:
Promise<IResponse>
setAttachState
Propagate the container state when container is attaching or attached.
Signature:
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
Parameters
Parameter | Type | Description |
---|---|---|
attachState | AttachState.Attaching | AttachState.Attached | State of the container. |
Returns:
void
setConnectionState
Notifies the runtime of a change in the connection state
Signature:
setConnectionState(connected: boolean, clientId?: string): any;
Parameters
Parameter | Type | Description |
---|---|---|
connected | boolean | |
clientId | string |
Returns:
any
snapshot
Snapshots the runtime
Signature:
snapshot(tagMessage: string, fullTree?: boolean): Promise<ITree | null>;
Parameters
Parameter | Type | Description |
---|---|---|
tagMessage | string | |
fullTree | boolean |
Returns:
Promise<ITree | null>
stop
Warning: This API is now obsolete.
in 0.14 async stop() Use snapshot to get a snapshot for an IRuntimeState as needed, followed by dispose
Stops the runtime. Once stopped no more messages will be delivered and the context passed to the runtime on creation will no longer be active
Signature:
stop(): Promise<IRuntimeState>;
Returns:
Promise<IRuntimeState>