MCPcopy
hub / github.com/kubernetes/client-go / threadSafeMap

Struct threadSafeMap

tools/cache/thread_safe_store.go:58–66  ·  view source on GitHub ↗

threadSafeMap implements ThreadSafeStore

Source from the content-addressed store, hash-verified

56
57// threadSafeMap implements ThreadSafeStore
58type threadSafeMap struct {
59 lock sync.RWMutex
60 items map[string]interface{}
61
62 // indexers maps a name to an IndexFunc
63 indexers Indexers
64 // indices maps a name to an Index
65 indices Indices
66}
67
68func (c *threadSafeMap) Add(key string, obj interface{}) {
69 c.lock.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected