@fluidframework/request-handler Package
Classes
Class | Description |
---|---|
RuntimeRequestHandlerBuilder | The RuntimeRequestHandlerBuilder creates a runtime request handler based on request handlers. The provided handlers sequentially applied until one is able to satisfy the request. |
Types
TypeAlias | Description |
---|---|
RuntimeRequestHandler | A request handler for the container runtime. Each handler should handle a specific request, and return undefined if it does not apply. These handlers are called in series, so there may be other handlers before or after. A handler should only return error if the request is for a route the handler owns, and there is a problem with the route, or fulling the specific request. |
Functions
Function | Return Type | Description |
---|---|---|
buildRuntimeRequestHandler(handlers) | (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse> | |
handleFromLegacyUri(uri, runtime) | IFluidHandle<T> |
Variables
Variable | Type | Description |
---|---|---|
createFluidObjectResponse | (fluidObject: FluidObject) => { status: 200; mimeType: "fluid/object"; value: FluidObject; } | |
rootDataStoreRequestHandler | (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined> | A request handler to expose access to all root data stores in the container by id. |
Function Details
buildRuntimeRequestHandler
Signature
export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
handlers | RuntimeRequestHandler[] |
Returns
Return type: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>
handleFromLegacyUri
Signature
export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
Type Parameters
Parameter | Default | Description |
---|---|---|
T | FluidObject & IFluidLoadable |
Parameters
Parameter | Type | Description |
---|---|---|
uri | string | |
runtime | IContainerRuntimeBase |
Returns
Return type: IFluidHandle<T>
Variable Details
createFluidObjectResponse
Signature
createFluidObjectResponse: (fluidObject: FluidObject) => {
status: 200;
mimeType: "fluid/object";
value: FluidObject;
}
Type: (fluidObject: FluidObject) => { status: 200; mimeType: "fluid/object"; value: FluidObject; }
rootDataStoreRequestHandler
A request handler to expose access to all root data stores in the container by id.
Signature
rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>
Type: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>