@fluidframework/protocol-base Package

Packages > @fluidframework/protocol-base

Classes

List of classes contained in this package or namespace
Class Description
AttachmentTreeEntry Basic implementation of an attachment ITreeEntry
BlobTreeEntry Basic implementation of a blob ITreeEntry
CommitTreeEntry Basic implementation of a commit ITreeEntry
ProtocolOpHandler Handles protocol specific ops.
Quorum A quorum represents all clients currently within the collaboration window. As well as the values they have agreed upon and any pending proposals.
QuorumProxy Proxies Quorum events.
TreeTreeEntry Basic implementation of a tree ITreeEntry

Functions

List of functions contained in this package or namespace
Function Description
addBlobToTree(tree, blobName, content)
buildHierarchy(flatTree, blobsShaToPathCache) Build a tree hierarchy base on a flat tree
generateServiceProtocolEntries(deli, scribe)
getGitMode(value) Take a summary object and returns its git mode.
getGitType(value) Take a summary object and returns its type.
getQuorumTreeEntries(documentId, minimumSequenceNumber, sequenceNumber, term, quorumSnapshot)
isSystemMessage(message)
mergeAppAndProtocolTree(appSummaryTree, protocolTree)

Interfaces

List of interfaces contained in this package or namespace
Interface Description
IQuorumSnapshot
IScribeProtocolState

Variables

List of variables contained in this package or namespace
Variable Description
isSystemType Check if the string is a system message type, which includes MessageType.RemoteHelp, MessageType.Integrate, MessageType.ClientJoin, MessageType.ClientLeave, MessageType.Fork

Functions

addBlobToTree

Signature:

export declare function addBlobToTree(tree: ITree, blobName: string, content: object): void;

Parameters

List of parameters
Parameter Type Description
tree ITree
blobName string
content object

Returns:

void

buildHierarchy

Build a tree hierarchy base on a flat tree

Signature:

export declare function buildHierarchy(flatTree: git.ITree, blobsShaToPathCache?: Map<string, string>): ISnapshotTree;

Parameters

List of parameters
Parameter Type Description
flatTree git.ITree a flat tree
blobsShaToPathCache Map Map with blobs sha as keys and values as path of the blob.

Returns:

ISnapshotTree

the hierarchical tree

generateServiceProtocolEntries

Signature:

export declare function generateServiceProtocolEntries(deli: string, scribe: string): ITreeEntry[];

Parameters

List of parameters
Parameter Type Description
deli string
scribe string

Returns:

ITreeEntry[]

getGitMode

Take a summary object and returns its git mode.

Signature:

export declare function getGitMode(value: SummaryObject): string;

Parameters

List of parameters
Parameter Type Description
value SummaryObject summary object

Returns:

string

the git mode of summary object

getGitType

Take a summary object and returns its type.

Signature:

export declare function getGitType(value: SummaryObject): string;

Parameters

List of parameters
Parameter Type Description
value SummaryObject summary object

Returns:

string

the type of summary object

getQuorumTreeEntries

Signature:

export declare function getQuorumTreeEntries(documentId: string, minimumSequenceNumber: number, sequenceNumber: number, term: number, quorumSnapshot: IQuorumSnapshot): ITreeEntry[];

Parameters

List of parameters
Parameter Type Description
documentId string
minimumSequenceNumber number
sequenceNumber number
term number
quorumSnapshot IQuorumSnapshot

Returns:

ITreeEntry[]

isSystemMessage

Signature:

export declare function isSystemMessage(message: ISequencedDocumentMessage): boolean;

Parameters

List of parameters
Parameter Type Description
message ISequencedDocumentMessage

Returns:

boolean

mergeAppAndProtocolTree

Signature:

export declare function mergeAppAndProtocolTree(appSummaryTree: ITree, protocolTree: ITree): ICreateTreeEntry[];

Parameters

List of parameters
Parameter Type Description
appSummaryTree ITree
protocolTree ITree

Returns:

ICreateTreeEntry[]

Variables

isSystemType

Check if the string is a system message type, which includes MessageType.RemoteHelp, MessageType.Integrate, MessageType.ClientJoin, MessageType.ClientLeave, MessageType.Fork

Signature:

isSystemType: (type: string) => boolean