-
Notifications
You must be signed in to change notification settings - Fork 551
Add ODSP version attach to OdspContainerServices #24595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,7 +7,11 @@ import type { | |||||
IConfigProviderBase, | ||||||
ITelemetryBaseLogger, | ||||||
} from "@fluidframework/core-interfaces"; | ||||||
import type { IMember, IServiceAudience } from "@fluidframework/fluid-static"; | ||||||
import type { | ||||||
IMember, | ||||||
IServiceAudience, | ||||||
ContainerAttachProps, | ||||||
} from "@fluidframework/fluid-static"; | ||||||
|
||||||
import type { IOdspTokenProvider } from "./token.js"; | ||||||
|
||||||
|
@@ -87,6 +91,11 @@ export interface OdspContainerServices { | |||||
* Provides an object that facilitates obtaining information about users present in the Fluid session, as well as listeners for roster changes triggered by users joining or leaving the session. | ||||||
*/ | ||||||
audience: IOdspAudience; | ||||||
|
||||||
/** | ||||||
* Attach function that is used to attach the container to the ODSP service. This function is specific to the ODSP service and accepts some ODSP specific properties. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I think this can be simplified, given the context (these are ODSP-specific types)
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also add a |
||||||
*/ | ||||||
attach(odspProps?: ContainerAttachProps<OdspContainerAttachProps>): Promise<string>; | ||||||
} | ||||||
|
||||||
/** | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are users expected to ever construct or implement the
OdspContainerServices
interface? Or do we exclusively provide objects of this type to them?If the latter, we should consider marking the interface as
@sealed
so that we can add new members in the future without it being considered a breaking change.Since this API is
@beta
, we can make this change. But adding a non-optional property would normally be breaking (if not sealed).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we return this interface in createContainer or getContainer call and very likely we need to add new stuff to this interface for ODSP specific features. I don't think clients need to implement this interface. @vladsud for any comments.
I will try to mark it as sealed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is type of out parameter in our API, and we expect no custom implementations.
That said, it's totally normal to construct custom implementation as a mock in tests.
I think sealed is fine.