Skip to content

feat(kad): add mode getter on Behaviour#5573

Merged
mergify[bot] merged 1 commit into
libp2p:masterfrom
stormshield-frb:feat/kad-add-dht-mode-getter
Aug 29, 2024
Merged

feat(kad): add mode getter on Behaviour#5573
mergify[bot] merged 1 commit into
libp2p:masterfrom
stormshield-frb:feat/kad-add-dht-mode-getter

Conversation

@stormshield-frb
Copy link
Copy Markdown
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

@stormshield-frb stormshield-frb force-pushed the feat/kad-add-dht-mode-getter branch from e3609c5 to fedc0dd Compare August 28, 2024 12:40
@stormshield-frb stormshield-frb force-pushed the feat/kad-add-dht-mode-getter branch from fedc0dd to bd19327 Compare August 28, 2024 13:15
@mergify mergify Bot merged commit cefd22b into libp2p:master Aug 29, 2024
@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