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

Function NewDeltaFIFO

tools/cache/delta_fifo.go:59–68  ·  view source on GitHub ↗

NewDeltaFIFO returns a Store which can be used process changes to items. keyFunc is used to figure out what key an object should have. (It's exposed in the returned DeltaFIFO's KeyOf() method, with bonus features.) 'keyLister' is expected to return a list of keys that the consumer of this queue "k

(keyFunc KeyFunc, knownObjects KeyListerGetter)

Source from the content-addressed store, hash-verified

57//
58// Also see the comment on DeltaFIFO.
59func NewDeltaFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter) *DeltaFIFO {
60 f := &DeltaFIFO{
61 items: map[string]Deltas{},
62 queue: []string{},
63 keyFunc: keyFunc,
64 knownObjects: knownObjects,
65 }
66 f.cond.L = &f.lock
67 return f
68}
69
70// DeltaFIFO is like FIFO, but allows you to process deletes.
71//

Calls

no outgoing calls