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

feat(iroh): allow to disable docs engine completely #2390

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Conversation

Frando
Copy link
Member

@Frando Frando commented Jun 20, 2024

Description

Make the docs engine optional on the iroh node.

  • Add Builder::disable_docs() to disable the docs engine completely
  • If called, the docs engine will not be spawned and the docs protocol will not be registered. Incoming docs connnections will be dropped, and all docs-related RPC calls will return an error "docs are disabled".

Breaking Changes

  • iroh::node::Builder::with_db_and_store now takes a DocsStorage enum instead of a iroh_docs::store::Store.

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

iroh/src/node/builder.rs Outdated Show resolved Hide resolved
iroh/src/node/rpc.rs Outdated Show resolved Hide resolved
iroh/src/node/rpc.rs Outdated Show resolved Hide resolved
iroh/src/node/rpc/docs.rs Outdated Show resolved Hide resolved
@Frando Frando marked this pull request as ready for review June 20, 2024 10:02
@Frando Frando requested review from rklaehn and dignifiedquire June 20, 2024 10:06
@Frando Frando added this pull request to the merge queue Jun 20, 2024
Merged via the queue into main with commit 0e6d441 Jun 20, 2024
30 checks passed
@dignifiedquire dignifiedquire deleted the feat/optional-docs branch June 20, 2024 12:54
ppodolsky pushed a commit to izihawa/iroh that referenced this pull request Jun 22, 2024
Make the docs engine optional on the iroh node.

* Add `Builder::disable_docs()` to disable the docs engine completely
* If called, the docs engine will not be spawned and the docs protocol
will not be registered. Incoming docs connnections will be dropped, and
all docs-related RPC calls will return an error "docs are disabled".

* `iroh::node::Builder::with_db_and_store` now takes a `DocsStorage`
enum instead of a `iroh_docs::store::Store`.

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

- [x] Self-review.
- [x] Documentation updates if relevant.
- [ ] Tests if relevant.
- [x] All breaking changes documented.
@ramfox ramfox added this to the v0.19.0 milestone Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants