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 b8ac21b commit 5e08a77
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 111 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The following emojis are used to highlight certain changes:
### Added

- `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` now has `WithContentBlocker` option which allows to filter Add and Get requests by CID.

### Changed

Expand Down
Loading

0 comments on commit 5e08a77

Please sign in to comment.