Add inserts an item, and puts it in the queue. The item is only enqueued if it doesn't already exist in the set.
(obj interface{})
| 171 | // Add inserts an item, and puts it in the queue. The item is only enqueued |
| 172 | // if it doesn't already exist in the set. |
| 173 | func (f *DeltaFIFO) Add(obj interface{}) error { |
| 174 | f.lock.Lock() |
| 175 | defer f.lock.Unlock() |
| 176 | f.populated = true |
| 177 | return f.queueActionLocked(Added, obj) |
| 178 | } |
| 179 | |
| 180 | // Update is just like Add, but makes an Updated Delta. |
| 181 | func (f *DeltaFIFO) Update(obj interface{}) error { |