| 43 | var _ sorted.KeyValue = (*KeyValue)(nil) |
| 44 | |
| 45 | type KeyValue struct { |
| 46 | buf, back sorted.KeyValue |
| 47 | maxBuffer int64 |
| 48 | |
| 49 | bufMu sync.Mutex |
| 50 | buffered int64 |
| 51 | |
| 52 | // This read lock should be held during Set/Get/Delete/BatchCommit, |
| 53 | // and the write lock should be held during Flush. |
| 54 | mu sync.RWMutex |
| 55 | } |
| 56 | |
| 57 | func (kv *KeyValue) Flush() error { |
| 58 | kv.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected