mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 23:11:25 +02:00
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:
@@ -3,10 +3,10 @@ package monitor
|
||||
import (
|
||||
"time"
|
||||
|
||||
F "github.com/yusing/go-proxy/internal/utils/functional"
|
||||
"github.com/puzpuzpuz/xsync/v4"
|
||||
)
|
||||
|
||||
var lastSeenMap = F.NewMapOf[string, time.Time]()
|
||||
var lastSeenMap = xsync.NewMap[string, time.Time](xsync.WithPresize(50), xsync.WithGrowOnly())
|
||||
|
||||
func SetLastSeen(service string, lastSeen time.Time) {
|
||||
lastSeenMap.Store(service, lastSeen)
|
||||
|
||||
Reference in New Issue
Block a user