IContainer Interface
Packages > @fluidframework/container-definitions > IContainer
The Host’s view of the Container and its connection to storage
Signature:
export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter
Extends: IEventProvider<IContainerEvents>, IFluidRouter
Properties
Property | Type | Description |
---|---|---|
attachState | AttachState | Indicates the attachment state of the container to a host service. |
deltaManager | IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> | The Delta Manager supporting the op stream for this Container |
resolvedUrl | IResolvedUrl | undefined | Represents the resolved url to the Container |
Methods
Method | Description |
---|---|
attach(request) | Attaches the Container to the Container specified by the given Request.TODO - in the case of failure options should give a retry policy. Or some continuation function that allows attachment to a secondary document. |
getAbsoluteUrl(relativeUrl) | Get an absolute url for a provided container-relative request url. If the container is not attached, this will return undefined. |
getQuorum() | The collection of write clients which were connected as of the current sequence number. Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted. |
request(request) | Issue a request against the container for a resource. |
serialize() | Extract the snapshot from the detached container. |
Events
attachState
Indicates the attachment state of the container to a host service.
Signature:
readonly attachState: AttachState;
deltaManager
The Delta Manager supporting the op stream for this Container
Signature:
deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
resolvedUrl
Represents the resolved url to the Container
Signature:
resolvedUrl: IResolvedUrl | undefined;
Methods
attach
Attaches the Container to the Container specified by the given Request.
TODO - in the case of failure options should give a retry policy. Or some continuation function that allows attachment to a secondary document.
Signature:
attach(request: IRequest): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest |
Returns:
Promise<void>
getAbsoluteUrl
Get an absolute url for a provided container-relative request url. If the container is not attached, this will return undefined.
Signature:
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
relativeUrl | string | A container-relative request URL |
Returns:
Promise<string | undefined>
getQuorum
The collection of write clients which were connected as of the current sequence number. Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.
Signature:
getQuorum(): IQuorum;
Returns:
request
Issue a request against the container for a resource.
Signature:
request(request: IRequest): Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
request | IRequest | The request to be issued against the container |
Returns:
Promise<IResponse>
serialize
Extract the snapshot from the detached container.
Signature:
serialize(): string;
Returns:
string