-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-relay): improve overall server structure (#2922)
## Description Trying to make the server relay code a little less crazy. - moves `stun_metrics` from `server` to `server::metrics` which is a more appropriate place for this. - moves `ServerMessage` (the messages the server actor receives) from `server` to `server::actor` - removes `ServerMessage::Shutdown` since there was already a `CancellationToken`, thus reducing the ways to shutdown to simply one. - removes the boolean field `ServerActorTask::closed`. We don't need this is we correctly handle shutdown on drop. - Makes `write_timeout` not an option. This was never `None`. - inline where possible to simplify - reduce types - some renaming of types, to make them easier to understand ## Breaking Changes - `iroh-relay` now uses `NodeGone` instead of `PeerGone` in some enums, but `iroh-relay` is unpublished, so technically not a breaking change --------- Co-authored-by: Floris Bruynooghe <flub@n0.computer>
- Loading branch information
1 parent
289b4cf
commit 0e57292
Showing
13 changed files
with
998 additions
and
1,276 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.