Documentation ¶
Index ¶
- type Shard
- func (s *Shard) Cache() interface{}
- func (s *Shard) Close() error
- func (s *Shard) Database() *rocks.DB
- func (s *Shard) DatabaseContent() map[string]string
- func (s *Shard) FlushTransaction() error
- func (s *Shard) ID() consumer.ShardID
- func (s *Shard) Partition() topic.Partition
- func (s *Shard) ReadOptions() *rocks.ReadOptions
- func (s *Shard) SetCache(c interface{})
- func (s *Shard) Transaction() *rocks.WriteBatch
- func (s *Shard) WriteOptions() *rocks.WriteOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shard ¶
type Shard struct { IDFixture consumer.ShardID PartitionFixture topic.Partition // contains filtered or unexported fields }
Test type which conforms to consumer.Shard, and manages setup & teardown of a test RocksDB instance.
func NewShard ¶
Initializes a Shard & database backed by a temporary directory. TODO(johnny): Since this is test support, panic on error (rather than returning it).
func (*Shard) DatabaseContent ¶
DatabaseContents enumerates and returns keys and values from the database as a map. As this is a test support method, it panics on iterator error.
func (*Shard) FlushTransaction ¶
Flushes the current Shard transaction WriteBatch to the database.
func (*Shard) ReadOptions ¶
func (s *Shard) ReadOptions() *rocks.ReadOptions
func (*Shard) Transaction ¶
func (s *Shard) Transaction() *rocks.WriteBatch
func (*Shard) WriteOptions ¶
func (s *Shard) WriteOptions() *rocks.WriteOptions
Click to show internal directories.
Click to hide internal directories.