refactor: remove unnecessary xsync.Map wrapper

- Updated agentPool, cachedAddr, fileContentMap, and lastSeenMap to use xsync.Map.
- Removed functional package and its related tests.
This commit is contained in:
yusing
2025-09-04 10:07:58 +08:00
parent 4a000316be
commit 97b6066466
10 changed files with 18 additions and 140 deletions

View File

@@ -3,11 +3,11 @@ package agent
import (
"iter"
"github.com/puzpuzpuz/xsync/v4"
"github.com/yusing/go-proxy/internal/common"
"github.com/yusing/go-proxy/internal/utils/functional"
)
var agentPool = functional.NewMapOf[string, *AgentConfig]()
var agentPool = xsync.NewMap[string, *AgentConfig](xsync.WithPresize(10))
func init() {
if common.IsTest {