mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
refactor: remove dead RemoveClientAffinity code, add affinity scheduling tests
- Remove RemoveClientAffinity from GatewayCache interface, implementation, Lua script, and all test mocks (never called in production code) - Add 26 unit tests for affinity scheduling: filterByMinAffinityCount, populateAffinityCounts, Layer 1/2 sort chain integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
d707c1f93f
commit
b9dc2e8eb5
11 files changed
+607
-43
No files matched your search
@@ -149,9 +149,6 @@ func (s *stickyGatewayCacheHotpathStub) GetClientAffinityAccounts(_ context.Cont
|
||||
func (s *stickyGatewayCacheHotpathStub) UpdateClientAffinity(_ context.Context, _ int64, _ string, _ int64, _ time.Duration) error {
|
||||
return nil
|
||||
}
|
||||
func (s *stickyGatewayCacheHotpathStub) RemoveClientAffinity(_ context.Context, _ int64, _ string, _ int64) error {
|
||||
return nil
|
||||
}
|
||||
func (s *stickyGatewayCacheHotpathStub) GetAccountAffinityCountBatch(_ context.Context, _ int64, _ []int64, _ time.Duration) (map[int64]int64, error) {
|
||||
return map[int64]int64{}, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user