HomePhabricator
Diffusion Comm e9209308664f

[Tunnelbroker] Refactor connection lifetimes into session object

Description

[Tunnelbroker] Refactor connection lifetimes into session object

Summary:
For better encapsulation around connection events
(e.g. device being authenticated and identified), moved
more of the connection logic into the session object.

Also, refine how connections are handled so they are properly
deregistered once a client closes a connection.

Depends on D7799

Test Plan:

nix develop

# init localstack and run terraform
comm-dev services start
(cd services/terraform && ./run.sh)

(cd services/tunnelbroker && cargo run &)
(cd services/commtest && cargo test --test tunnelbroker_integration_test)
# Previously, running the suite twice would fail
(cd services/commtest && cargo test --test tunnelbroker_integration_test)

Reviewers: bartek, varun

Reviewed By: bartek, varun

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7800

Details

Provenance
jonAuthored on May 12 2023, 2:23 PM
Reviewer
bartek
Differential Revision
D7800: [Tunnelbroker] Refactor connection lifetimes into session object
Parents
rCOMMfadf7a78b5bf: [Tunnelbroker] Initial message persistence
Branches
Unknown
Tags
Unknown