Skip to content

feat: use watchable instead of callbacks for netmon changes #25

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dignifiedquire
Copy link
Contributor

Description

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

Copy link

github-actions bot commented May 15, 2025

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-15T11:51:26Z

Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

.await?;
r.await?;
Ok(())
pub fn subscribe(&self) -> n0_watcher::Direct<State> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit, .subscribe().get() is a bit odd. But I don't mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@n0bot n0bot bot added this to iroh May 15, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

3 participants