Documentation ¶
Index ¶
- type ManyRocks
- type Opts
- type Rock
- func (t *Rock) Close()
- func (t *Rock) CloseExtentDB()
- func (t *Rock) DeleteExtent()
- func (t *Rock) Get(addr s.Address) (key s.Key, val s.Value, nextAddr s.Address, nextKey s.Key, err error)
- func (t *Rock) GetKey(getKeyAddr s.Address) (key s.Key, err error)
- func (t *Rock) GetMany(addr s.Address, numMsgs int32, endAddr s.Address) (msgs []s.KeyValue, nextAddr s.Address, nextKey s.Key, err error)
- func (t *Rock) Next(addr s.Address) (nextAddr s.Address, nextKey s.Key, err error)
- func (t *Rock) Purge(purgeAddr s.Address) (nextAddr s.Address, nextKey s.Key, err error)
- func (t *Rock) Put(key s.Key, val s.Value) (addr s.Address, err error)
- func (t *Rock) SeekCeiling(ceilKey s.Key) (addr s.Address, key s.Key, err error)
- func (t *Rock) SeekFirst() (addr s.Address, key s.Key, err error)
- func (t *Rock) SeekFloor(floorKey s.Key) (addr s.Address, key s.Key, err error)
- func (t *Rock) SeekLast() (addr s.Address, key s.Key, err error)
- func (t *Rock) Sync()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManyRocks ¶
ManyRocks implements the storage.StoreManager interface
func (*ManyRocks) GetExtentInfo ¶
func (t *ManyRocks) GetExtentInfo(id s.ExtentUUID) (info *s.ExtentInfo, err error)
GetExtentInfo returns information about an extent
func (*ManyRocks) ListExtents ¶
func (t *ManyRocks) ListExtents() (extents []s.ExtentUUID, err error)
ListExtents returns a list of extents available on the store
func (*ManyRocks) OpenExtent ¶
func (t *ManyRocks) OpenExtent(id s.ExtentUUID, keyPattern s.KeyPattern, notify s.NotifyFunc, failIfNotExist bool) (s.ExtentStore, error)
OpenExtent opens an extent, adhering to the storage.ExtentStore interface
type Opts ¶
type Opts struct {
BaseDir string
}
Opts are the options passed into creating a new instance of ManyRocks
type Rock ¶
type Rock struct {
// contains filtered or unexported fields
}
Rock implements the storage.ExtentStore interface; it uses a separate RocksDB instance for each extent.
func OpenExtentDB ¶
func OpenExtentDB(id s.ExtentUUID, path string) (*Rock, error)
OpenExtentDB gets a handle to the raw extent DB
func (*Rock) Close ¶
func (t *Rock) Close()
Close cleans up this interface. Deregisters the notification channel automatically.
func (*Rock) CloseExtentDB ¶
func (t *Rock) CloseExtentDB()
CloseExtentDB closes the handle to the raw extent DB
func (*Rock) DeleteExtent ¶
func (t *Rock) DeleteExtent()
DeleteExtent marks the extent store for deletion. When the handle is closed this would delete the entire extent.
func (*Rock) Get ¶
func (t *Rock) Get(addr s.Address) (key s.Key, val s.Value, nextAddr s.Address, nextKey s.Key, err error)
Get retrieves the message corresponding to the given address
func (*Rock) GetKey ¶
GetKey returns the key of the message at the given address. In a sense, it is the inverse
func (*Rock) GetMany ¶
func (t *Rock) GetMany(addr s.Address, numMsgs int32, endAddr s.Address) (msgs []s.KeyValue, nextAddr s.Address, nextKey s.Key, err error)
GetMany is like Get, but returns a batch of max 'numMsgs' between [addr, endAddr)
func (*Rock) Next ¶
Next returns the address of the the message immediately following the one at the given address
func (*Rock) Purge ¶
Purge deletes all messages whose address is less than or equal to the given address.
func (*Rock) Put ¶
Put inserts message into the extent against the given 'key' and returns its 'address'
func (*Rock) SeekCeiling ¶
SeekCeiling returns the address of the message for the given 'key' or the one following it
func (*Rock) SeekFloor ¶
SeekFloor returns the address of the message less than or equal to the given key