Skip to content

Commit

Permalink
blockservice: move to single unique struct and add `WithContentBlocke…
Browse files Browse the repository at this point in the history
…r` option

The idea is to have a THE blockservice object, this means we wont ever have an issue where multiple competitive features play poorly with each other due to how nested blockservices could do.

Let's say we add multi-exchange based on content routing, do we want to have to handle the mess this could create with nested blockservices ?

It implements features for ipfs-shipyard/nopfs#34.
  • Loading branch information
Jorropo committed Jan 15, 2024
1 parent 0536783 commit 27a4b69
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 103 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The following emojis are used to highlight certain changes:

- `blockservice` now has `ContextWithSession` and `EmbedSessionInContext` functions, which allows to embed a session in a context. Future calls to `BlockGetter.GetBlock`, `BlockGetter.GetBlocks` and `NewSession` will use the session in the context.
- `blockservice.NewWritethrough` deprecated function has been removed, instead you can do `blockservice.New(..., ..., WriteThrough())` like previously.
- `blockservice` now has `WithContentBlocker` option which allows to filter Add and Get requests by CID.

### Changed

Expand Down
Loading

0 comments on commit 27a4b69

Please sign in to comment.