FirstIndex is a method on RocksDbStore that returns the first index in the log
()
| 35 | |
| 36 | // FirstIndex is a method on RocksDbStore that returns the first index in the log |
| 37 | func (rds *RocksDbStore) FirstIndex() (uint64, error) { |
| 38 | ro := gorocksdb.NewDefaultReadOptions() |
| 39 | defer ro.Destroy() |
| 40 | it := rds.conn.NewIterator(ro) |
| 41 | it.SeekToFirst() |
| 42 | return bytesToUint64(it.Key().Data()), nil |
| 43 | } |
| 44 | |
| 45 | // LastIndex is a method on RocksDbStore that returns the last index in the log |
| 46 | func (rds *RocksDbStore) LastIndex() (uint64, error) { |
nothing calls this directly
no test coverage detected