middleware-manager/util
hhftechnologies 90a75b5a93 harden HTTP usage, caching, and transactional deletes
add safety across services: whitelist tables for DeleteInTransaction to prevent dynamic-SQL deletion abuse; remove a deprecated UpdateInTransaction helper. centralize HTTP client creation (HTTPClientWithTimeout/GetHTTPClient) and replace ad-hoc http.Clients with it; limit response body reads with io.LimitReader to avoid unbounded memory use; add better error logging when JSON marshal fails. Improve ConfigProxy cache handling to fetch outside locks, return stale cache on fetch errors, and only lock to swap the cache; add locking to SetCacheDuration and cap error body reads. convert ResourceWatcher isRunning to atomic.Bool for safe concurrent start/stop. Replace sync.Map memoization in id_normalizer with a bounded map protected by RWMutex (maxCacheSize), add cache flush behavior and tests/benchmarks to validate boundedness and hits. Miscellaneous test updates to match new behavior.
2026-03-01 14:22:02 +05:30
..
id_normalizer.go harden HTTP usage, caching, and transactional deletes 2026-03-01 14:22:02 +05:30
id_normalizer_test.go harden HTTP usage, caching, and transactional deletes 2026-03-01 14:22:02 +05:30