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)
| 57 | // |
| 58 | // Also see the comment on DeltaFIFO. |
| 59 | func 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 | // |
no outgoing calls