ksysoev / wasabi

Toolkit for Creating WebSocket API Gateways
MIT License
4 stars 2 forks source link

Implement connection hooks logic #35

Closed ksysoev closed 2 months ago

ksysoev commented 2 months ago

This pull request adds the implementation of connection hooks logic to the ConnectionRegistry. It introduces two new options, WithOnConnect and WithOnDisconnect, which allow users to set callback functions that will be executed when a new connection is established or when a connection is disconnected, respectively. This feature provides flexibility for performing additional operations or handling events related to connections.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.94%. Comparing base (e21f163) to head (f79da99). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #35 +/- ## ========================================== + Coverage 88.00% 88.94% +0.94% ========================================== Files 16 16 Lines 575 597 +22 ========================================== + Hits 506 531 +25 + Misses 53 51 -2 + Partials 16 15 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.