Skip to content
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

client handler: allow to set/get application specific data #416

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

drakkan
Copy link
Collaborator

@drakkan drakkan commented Aug 17, 2023

This is a common pattern to allow applications to store arbitrary extra data on each connection and easily retrieve this data.

Currently in sftpgo I have something like this map[uint32]any, where the make key is the connection id, accessing this map requires a mutex, adding the extra data directly on the connection allows safe access without a mutex

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0b1ad95) 86.46% compared to head (f3d4994) 86.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #416      +/-   ##
==========================================
+ Coverage   86.46%   86.49%   +0.03%     
==========================================
  Files          11       11              
  Lines        1603     1607       +4     
==========================================
+ Hits         1386     1390       +4     
  Misses        151      151              
  Partials       66       66              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fclairamb fclairamb merged commit 24adecb into fclairamb:main Jan 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants