(key string)
| 247 | } |
| 248 | |
| 249 | func (m *mockKV) ResetIndexForKey(key string) { |
| 250 | m.mtx.Lock() |
| 251 | defer m.mtx.Unlock() |
| 252 | |
| 253 | if value, ok := m.kvps[key]; ok { |
| 254 | value.ModifyIndex = 0 |
| 255 | } |
| 256 | |
| 257 | m.cond.Broadcast() |
| 258 | level.Debug(m.logger).Log("msg", "ResetIndexForKey", "key", key) |
| 259 | } |
| 260 | |
| 261 | // mockedMaxWaitTime returns the minimum duration between the input duration |
| 262 | // and the max wait time allowed in this mock, in order to have faster tests. |