| 146 | } |
| 147 | |
| 148 | func (d *dummyOwner) UpdateIdentities(added, deleted identity.IdentityMap) <-chan struct{} { |
| 149 | d.mutex.Lock() |
| 150 | d.logger.Debug(fmt.Sprintf("Dummy UpdateIdentities(added: %v, deleted: %v)", added, deleted)) |
| 151 | for id, lbls := range added { |
| 152 | d.cache[id] = lbls |
| 153 | d.updated <- id |
| 154 | } |
| 155 | for id := range deleted { |
| 156 | delete(d.cache, id) |
| 157 | d.updated <- id |
| 158 | } |
| 159 | d.mutex.Unlock() |
| 160 | out := make(chan struct{}) |
| 161 | close(out) |
| 162 | return out |
| 163 | } |
| 164 | |
| 165 | func (d *dummyOwner) GetIdentity(id identity.NumericIdentity) labels.LabelArray { |
| 166 | d.mutex.Lock() |