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

Method Get

tools/cache/store.go:194–200  ·  view source on GitHub ↗

Get returns the requested item, or sets exists=false. Get is completely threadsafe as long as you treat all items as immutable.

(obj interface{})

Source from the content-addressed store, hash-verified

192// Get returns the requested item, or sets exists=false.
193// Get is completely threadsafe as long as you treat all items as immutable.
194func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) {
195 key, err := c.keyFunc(obj)
196 if err != nil {
197 return nil, false, KeyError{obj, err}
198 }
199 return c.GetByKey(key)
200}
201
202// GetByKey returns the request item, or exists=false.
203// GetByKey is completely threadsafe as long as you treat all items as immutable.

Callers

nothing calls this directly

Calls 1

GetByKeyMethod · 0.95

Tested by

no test coverage detected