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

iroh-bytes: listing operations need pagination arguments #1676

Closed
b5 opened this issue Oct 19, 2023 · 3 comments
Closed

iroh-bytes: listing operations need pagination arguments #1676

b5 opened this issue Oct 19, 2023 · 3 comments
Assignees
Labels
_c-iroh-legacy Formerly big iroh node with all protocols ux
Milestone

Comments

@b5
Copy link
Member

b5 commented Oct 19, 2023

hey @rklaehn, can I haz offset and limit args on all these plz? my frontend UI is choking b/c my node has 40k+ blobs

iroh/iroh/src/client.rs

Lines 342 to 364 in a93e89e

pub async fn list(&self) -> Result<impl Stream<Item = Result<BlobListResponse>>> {
let stream = self.rpc.server_streaming(BlobListRequest).await?;
Ok(stream.map_err(anyhow::Error::from))
}
/// List all incomplete (partial) blobs.
pub async fn list_incomplete(
&self,
) -> Result<impl Stream<Item = Result<BlobListIncompleteResponse>>> {
let stream = self.rpc.server_streaming(BlobListIncompleteRequest).await?;
Ok(stream.map_err(anyhow::Error::from))
}
/// List all collections.
pub async fn list_collections(
&self,
) -> Result<impl Stream<Item = Result<BlobListCollectionsResponse>>> {
let stream = self
.rpc
.server_streaming(BlobListCollectionsRequest)
.await?;
Ok(stream.map_err(anyhow::Error::from))
}

cc @ramfox, this will affect FFI args.

@b5 b5 added the ux label Oct 19, 2023
@b5 b5 added this to the v0.8.0 milestone Oct 19, 2023
@b5 b5 added this to iroh Oct 19, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in iroh Oct 19, 2023
@b5
Copy link
Member Author

b5 commented Oct 19, 2023

update: these should be done as queries after we figure out #1667

@b5 b5 modified the milestones: v0.8.0, v0.10.0 Oct 19, 2023
@dignifiedquire dignifiedquire modified the milestones: v0.10.0, v0.9.0 Oct 23, 2023
@divagant-martian divagant-martian modified the milestones: v0.10.0, v0.11.0 Nov 1, 2023
@dignifiedquire dignifiedquire modified the milestones: v0.11.0, v0.10.0 Nov 6, 2023
@dignifiedquire
Copy link
Contributor

this is part of #1766

@dignifiedquire dignifiedquire changed the title listing operations need pagination arguments iroh-bytes: listing operations need pagination arguments Nov 8, 2023
@dignifiedquire dignifiedquire added the _c-iroh-legacy Formerly big iroh node with all protocols label Nov 8, 2023
@dignifiedquire
Copy link
Contributor

this was not part of #1766, but can be done using stream modifiers skip and take.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in iroh Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_c-iroh-legacy Formerly big iroh node with all protocols ux
Projects
Archived in project
Development

No branches or pull requests

4 participants