Skip to content

Conversation

@Amr-Shams
Copy link

Description

  • Adds binary serialization support for allocation-related objects.

  • Implements MarshalBinary and UnmarshalBinary for Allocation, Permission, ChannelBind, and FiveTuple

  • Improves deserialization error handling

Adds unit tests for serialization/deserialization

Reference issue

Fixes #487

- added test cases to test the marshal and unmarshal
- added stop func to reset the expiry date of each obj
@Amr-Shams
Copy link
Author

i have noticed the new tcpConncetions in the allocation struct, from where i understand it shouldn't serialized as it is a runtime, but found two methods on the allocation manager AddTcpConnection and GetTcpConenction

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.07%. Comparing base (47cddef) to head (3c7c501).

Files with missing lines Patch % Lines
internal/allocation/allocation.go 68.08% 19 Missing and 11 partials ⚠️
internal/allocation/channel_bind.go 71.73% 10 Missing and 3 partials ⚠️
internal/allocation/permission.go 73.80% 8 Missing and 3 partials ⚠️
internal/allocation/five_tuple.go 84.21% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
- Coverage   80.70%   80.07%   -0.63%     
==========================================
  Files          46       46              
  Lines        2809     3022     +213     
==========================================
+ Hits         2267     2420     +153     
- Misses        351      392      +41     
- Partials      191      210      +19     
Flag Coverage Δ
go 80.07% <72.72%> (-0.63%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sean-Der
Copy link
Member

Sorry for the delay on this @Amr-Shams I will work on getting this merged tonight!

This is my only focus now. Would love to work together on this closely. I will be able to review same day now.

@Amr-Shams
Copy link
Author

Sorry for the delay on this @Amr-Shams I will work on getting this merged tonight!

This is my only focus now. Would love to work together on this closely. I will be able to review same day now.

Thank u for ur time, i know there have been couple of major releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

TURN allocation marshaler/unmarshaler

2 participants