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

Method ListKeys

tools/cache/heap.go:271–279  ·  view source on GitHub ↗

ListKeys returns a list of all the keys of the objects currently in the Heap.

()

Source from the content-addressed store, hash-verified

269
270// ListKeys returns a list of all the keys of the objects currently in the Heap.
271func (h *Heap) ListKeys() []string {
272 h.lock.RLock()
273 defer h.lock.RUnlock()
274 list := make([]string, 0, len(h.data.items))
275 for key := range h.data.items {
276 list = append(list, key)
277 }
278 return list
279}
280
281// Get returns the requested item, or sets exists=false.
282func (h *Heap) Get(obj interface{}) (interface{}, bool, error) {

Callers 1

TestHeap_ListKeysFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestHeap_ListKeysFunction · 0.76