-
Notifications
You must be signed in to change notification settings - Fork 9
Add throttling for resource notifications #92
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
Conversation
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
@@ -37,8 +37,19 @@ base mixin ResourcesSupport on MCPServer { | |||
final List<({ResourceTemplate template, ReadResourceHandler handler})> | |||
_resourceTemplates = []; | |||
|
|||
/// The list of currently subscribed resources by URI. | |||
final Set<String> _subscribedResources = {}; | |||
/// The currently subscribed resource [StreamController]s by URI. |
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.
can you be more specific of what type of URI is expected? (e.g. file uri, absolute, etc.)
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.
These can be any URI, as defined by the server.
Co-authored-by: Nate Bosch <[email protected]>
This is in anticipation of potentially modeling runtime errors as resources, so they might be updated often. But it is in general a good practice to throttle these.