MCPcopy Create free account
hub / github.com/Azure/peerd / SyncMap

Struct SyncMap

pkg/cache/syncmap.go:12–17  ·  view source on GitHub ↗

The default eviction percentage. Used when the map reaches its capacity at insertion. SyncMap is a map that can be safely accessed concurrently.

Source from the content-addressed store, hash-verified

10
11// SyncMap is a map that can be safely accessed concurrently.
12type SyncMap struct {
13 mapObj *map[string]interface{}
14 lock *sync.RWMutex
15 capacity int
16 evictionPercentage int
17}
18
19// Get retrieves the value associated with the given key from the SyncMap.
20// It returns the value and a boolean indicating whether the key was found.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected