Merged
Conversation
alanshaw
commented
May 13, 2024
| } | ||
|
|
||
| export declare class Dagula implements IDagula { | ||
| export declare class Dagula implements BlockService, DagService, UnixfsService { |
Member
Author
There was a problem hiding this comment.
Note: I'm planning on separating this into multiple classes that implement the respective interfaces. However it's going to take a bit of time because the unixfs specific stuff is all mixed up with the generic DAG traversal stuff.
WIP: #45
alanshaw
pushed a commit
that referenced
this pull request
May 14, 2024
🤖 I have created a release *beep* *boop* --- ## [8.0.0](v7.3.0...v8.0.0) (2024-05-14) ### ⚠ BREAKING CHANGES * The `Blockstore` interface now includes a `stream` method that returns a `ReadableStream` and a `stat` method that returns info (byte size). ### Features * add block streaming interface ([#44](#44)) ([2236fe4](2236fe4)) ### Bug Fixes * remove only test ([#42](#42)) ([ca858fb](ca858fb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
alanshaw
pushed a commit
to storacha/gateway-lib
that referenced
this pull request
May 14, 2024
Supports byte ranges for raw block requests - including multipart. depends on storacha/dagula#44 refs storacha/freeway#100 (comment) BREAKING CHANGE: dependencies for handlers have changed, splitting out block, DAG and unixfs services. These are all satisfied by the `Dagula` class for the time being.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a
streamBlock(cid, [options])method to Dagula that returns aReadableStreamof block bytes. You can optionally pass a byte range to extract a subset of bytes.Also
statBlock(cid, [options])that retrieves block info i.e. total size in bytes.The idea is to allow dagula to serve byte ranges from big blocks without having to load the whole thing into memory.
BREAKING CHANGE: The
Blockstoreinterface now includes astreammethod that returns aReadableStreamand astatmethod that returns info (byte size).The format for the
entityBytesoption ofgetPathhas changed. It is now an array of 1 or 2 numbers. SeeRangetype for more details.refs storacha/freeway#100 (comment)