Skip to content 

@fluidframework/runtime-utils Package

Packages > @fluidframework/runtime-utils

Classes

List of classes contained in this package or namespace
Class Description
FluidSerializer Data Store serializer implementation
ObjectStoragePartition Returns a new IChannelStorageService that resolves the given path as root.
RequestParser The Request Parser takes an IRequest provides parsing and sub request creation
SummarizerNode Encapsulates the summarizing work and state of an individual tree node in the summary tree. It tracks changes and allows for optimizations when unchanged, or can allow for fallback summaries to be generated when an error is encountered. Usage is for the root node to call startSummary first to begin tracking a WIP (work in progress) summary. Then all nodes will call summarize to summaries their individual parts. Once completed and uploaded to storage, the root node will call completeSummary or clearSummary to clear the WIP summary tracking state if something went wrong. The SummarizerNodes will track all pending summaries that have been recorded by the completeSummary call. When one of them is acked, the root node should call refreshLatestSummary to inform the tree of SummarizerNodes of the new baseline latest successful summary.
SummaryTracker SummaryTracker is a tree node which allows for deferred snapshot tree access and tracks the latest acked summary reference sequence number.
SummaryTreeBuilder

Functions

List of functions contained in this package or namespace
Function Description
addBlobToSummary(summary, key, content)
calculateStats(summary)
convertToSummaryTree(snapshot, fullTree) Converts snapshot ITree to ISummaryTree format and tracks stats.
generateHandleContextPath(path, routeContext) Generates the absolute path for an IFluidHandleContext given its path and its parent routeContext.
getBlobSize(content)
getNormalizedObjectStoragePathParts(path)
listBlobsAtTreePath(inputTree, path)
mergeStats(stats) Combines summary stats by adding their totals together. Returns empty stats if called without args.
requestFluidObject(router, url)

Variables

List of variables contained in this package or namespace
Variable Description
isSerializedHandle

Type Aliases

List of type aliases contained in this package or namespace
Type Alias Description
ReadAndParseBlob Reads a blob from storage and parses it from JSON.

Functions

addBlobToSummary

Signature:

export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;

Parameters

List of parameters
Parameter Type Description
summary ISummaryTreeWithStats
key string
content string | Uint8Array

Returns:

void

calculateStats

Signature:

export declare function calculateStats(summary: ISummaryTree): ISummaryStats;

Parameters

List of parameters
Parameter Type Description
summary ISummaryTree

Returns:

ISummaryStats

convertToSummaryTree

Converts snapshot ITree to ISummaryTree format and tracks stats.

Signature:

export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;

Parameters

List of parameters
Parameter Type Description
snapshot ITree snapshot in ITree format
fullTree boolean true to never use handles, even if id is specified

Returns:

ISummarizeResult

generateHandleContextPath

Generates the absolute path for an IFluidHandleContext given its path and its parent routeContext.

Signature:

export declare function generateHandleContextPath(path: string, routeContext?: IFluidHandleContext): string;

Parameters

List of parameters
Parameter Type Description
path string
routeContext IFluidHandleContext

Returns:

string

getBlobSize

Signature:

export declare function getBlobSize(content: ISummaryBlob["content"]): number;

Parameters

List of parameters
Parameter Type Description
content ISummaryBlob["content"]

Returns:

number

getNormalizedObjectStoragePathParts

Signature:

export declare function getNormalizedObjectStoragePathParts(path: string): string[];

Parameters

List of parameters
Parameter Type Description
path string

Returns:

string[]

listBlobsAtTreePath

Signature:

export declare function listBlobsAtTreePath(inputTree: ITree, path: string): Promise<string[]>;

Parameters

List of parameters
Parameter Type Description
inputTree ITree
path string

Returns:

Promise<string[]>

mergeStats

Combines summary stats by adding their totals together. Returns empty stats if called without args.

Signature:

export declare function mergeStats(...stats: ISummaryStats[]): ISummaryStats;

Parameters

List of parameters
Parameter Type Description
stats ISummaryStats[] stats to merge

Returns:

ISummaryStats

requestFluidObject

Signature:

export declare function requestFluidObject<T = IFluidObject>(router: IFluidRouter, url: string | IRequest): Promise<T>;

Parameters

List of parameters
Parameter Type Description
router IFluidRouter
url string | IRequest

Returns:

Promise<T>

Variables

isSerializedHandle

Signature:

isSerializedHandle: (value: any) => value is ISerializedHandle

Type Aliases

ReadAndParseBlob

Reads a blob from storage and parses it from JSON.

Signature:

export declare type ReadAndParseBlob = <T>(id: string) => Promise<T>;