-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert attributor to IFluidDataStoreChannel (#22120)
## Description Convert attributor to IFluidDataStoreChannel, so that it can have all the capacity of a datastore channel like send/receive ops, summarize etc. This will be useful for custom attribution support where we will need all this functionality. Doc link for custom attribution where we will be using this to send/receive ops: https://microsoft-my.sharepoint-df.com/:w:/p/jatgarg/EaqG3AT4CrRHpN_l_vorFf4B35C5W39g8S1VI0_syIzUuQ?e=r5YiBX Still working on some of the test in this PR but putting out there for review. --------- Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
- Loading branch information
Showing
12 changed files
with
698 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
import { | ||
type AttributionInfo, | ||
type AttributionKey, | ||
} from "@fluidframework/runtime-definitions/internal"; | ||
|
||
// Summary tree keys | ||
export const opBlobName = "opAttributor"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const enableOnNewFileKey = "Fluid.Attribution.EnableOnNewFile"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const IRuntimeAttributor: keyof IProvideRuntimeAttributor = "IRuntimeAttributor"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export interface IProvideRuntimeAttributor { | ||
readonly IRuntimeAttributor: IRuntimeAttributor; | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const attributorDataStoreAlias = "attributor-cf9b6fe4-4c50-4a5d-9045-eb73b886f740"; | ||
|
||
/** | ||
* Provides access to attribution information stored on the container runtime. | ||
* | ||
* @remarks Attributors are only populated after the container runtime into which they are being injected has initialized. | ||
* | ||
* @sealed | ||
* @internal | ||
*/ | ||
export interface IRuntimeAttributor extends IProvideRuntimeAttributor { | ||
/** | ||
* @throws - If no AttributionInfo exists for this key. | ||
*/ | ||
get(key: AttributionKey): AttributionInfo; | ||
|
||
/** | ||
* @returns Whether any AttributionInfo exists for the provided key. | ||
*/ | ||
has(key: AttributionKey): boolean; | ||
|
||
/** | ||
* @returns Whether the runtime is currently tracking attribution information for the loaded container. | ||
* If enabled, the runtime attributor can be asked for the attribution info for different keys. | ||
* See {@link mixinAttributor} for more details on when this happens. | ||
*/ | ||
readonly isEnabled: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.