Skip to content
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

getMiniflareDurableObjectIds(class: string) helper function #384

Closed
DaniFoldi opened this issue Sep 20, 2022 · 0 comments · Fixed by #413
Closed

getMiniflareDurableObjectIds(class: string) helper function #384

DaniFoldi opened this issue Sep 20, 2022 · 0 comments · Fixed by #413
Labels
enhancement New feature or request
Milestone

Comments

@DaniFoldi
Copy link
Contributor

Durable Object IDs have no runtime binding to be listed, however the Cloudflare API has an endpoint to retrieve all created Durable Objects, with the additional information whether there is storage attached.

A helper function like getMiniflareDurableObjectIds(class: string) could return an array like the API, probably without the pagination, or the limits.

This could be useful in tests to verify if in certain cases no DO is created, or that no storage is used.
A possible extension could be to also provide a _stored key which shows how many bytes the Durable Object is using.

@mrbbot mrbbot added the enhancement New feature or request label Sep 20, 2022
@mrbbot mrbbot added this to the 2.10.0 milestone Sep 20, 2022
@mrbbot mrbbot modified the milestones: 2.10.0, 2.11.0 Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants