feat: use watchable instead of callbacks for netmon changes#25
Merged
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/net-tools/pr/25/docs/net_tools/ Last updated: 2025-05-23T11:34:29Z |
flub
approved these changes
May 15, 2025
| .await?; | ||
| r.await?; | ||
| Ok(()) | ||
| pub fn subscribe(&self) -> n0_watcher::Direct<State> { |
Contributor
There was a problem hiding this comment.
Small nit, .subscribe().get() is a bit odd. But I don't mind.
Member
There was a problem hiding this comment.
Suggestion: We use e.g. local_addrs_watch or just the name of what it is, e.g. node_addr or conn_type elsewhere. So perhaps we could use interface_state() -> n0_watcher::Direct<State> here? Or watch_interface_state()? Or if_state_watcher()? or sth like that.
Contributor
Author
There was a problem hiding this comment.
changed to interface_state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Breaking Changes
Notes & open questions
Change checklist