From discussion with @mschoch and @sreekanth-cb, thoughts on changes to Segment interface to make it more generic, and not so specific to an array based implementation...
type Segment interface {
+ // DRAFT / NEW method...
+ Get(key []byte) (operation uint64, val []byte, error)
+
+ // And also remove FindKeyPos().
+
+ // DRAFT - replace FindStartKeyInclusivePos() with
+ // some opaque cursor / handle based approach...
+ type Cursor interface {
+ Current() (operation uint64, key []byte, val []byte, error)
+ Next() error
+ }
+
+ FindStartKeyInclusiveCursor(startKeyInclusive, endKeyExclusive []byte) (Cursor, error)
From discussion with @mschoch and @sreekanth-cb, thoughts on changes to Segment interface to make it more generic, and not so specific to an array based implementation...