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

Method Get

tools/cache/heap.go:282–288  ·  view source on GitHub ↗

Get returns the requested item, or sets exists=false.

(obj interface{})

Source from the content-addressed store, hash-verified

280
281// Get returns the requested item, or sets exists=false.
282func (h *Heap) Get(obj interface{}) (interface{}, bool, error) {
283 key, err := h.data.keyFunc(obj)
284 if err != nil {
285 return nil, false, KeyError{obj, err}
286 }
287 return h.GetByKey(key)
288}
289
290// GetByKey returns the requested item, or sets exists=false.
291func (h *Heap) GetByKey(key string) (interface{}, bool, error) {

Callers 1

TestHeap_GetFunction · 0.95

Calls 1

GetByKeyMethod · 0.95

Tested by 1

TestHeap_GetFunction · 0.76