MCPcopy Create free account
hub / github.com/quay/clair / Copy

Method Copy

httptransport/client/httpclient.go:35–45  ·  view source on GitHub ↗

Copy returns a copy of the cache contents to the caller. It is safe for concurrent use.

()

Source from the content-addressed store, hash-verified

33//
34// It is safe for concurrent use.
35func (c *uoCache) Copy() map[string][]driver.UpdateOperation {
36 m := map[string][]driver.UpdateOperation{}
37 c.RLock()
38 defer c.RUnlock()
39 for u, ops := range c.uo {
40 o := make([]driver.UpdateOperation, len(ops))
41 copy(o, ops)
42 m[u] = o
43 }
44 return m
45}
46
47func newOUCache() *uoCache {
48 return &uoCache{

Callers 5

setupHandlerFunction · 0.80
DiscoveryHandlerFunction · 0.80
TestIndexerV1Function · 0.80
RunMethod · 0.80
updateOperationsMethod · 0.80

Calls

no outgoing calls

Tested by 3

setupHandlerFunction · 0.64
TestIndexerV1Function · 0.64
RunMethod · 0.64