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(kad): add mode getter on Behaviour #5573

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

stormshield-frb
Copy link
Contributor

@stormshield-frb stormshield-frb commented Aug 28, 2024

Description

Small PR adding a getter for the mode attribute of the kad::Behaviour in order to get the mode that the DHT is operating in, at the moment.

Notes & open questions

In our project, we needed to expose an API endpoint which included the mode that the DHT was operating. Having a getter was necessary so we are upstreaming this change.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@mergify mergify bot merged commit cefd22b into libp2p:master Aug 29, 2024
72 checks passed
@stormshield-frb stormshield-frb deleted the feat/kad-add-dht-mode-getter branch August 29, 2024 15:26
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this pull request Sep 14, 2024
## Description

Small PR adding a getter for the `mode` attribute of the
`kad::Behaviour` in order to get the mode that the DHT is operating in,
at the moment.

In our project, we needed to expose an API endpoint which included the
mode that the DHT was operating. Having a getter was necessary so we are
upstreaming this change.

## Notes & open questions

<!--
Any notes, remarks or open questions you have to make about the PR which
don't need to go into the final commit message.
-->

## Change checklist

<!-- Please add a Changelog entry in the appropriate crates and bump the
crate versions if needed. See
<https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>-->

- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] A changelog entry has been made in the appropriate crates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants