Documentation ¶
Index ¶
- type TestStorage
- func (m *TestStorage) Close()
- func (m *TestStorage) Flush() error
- func (m *TestStorage) Insert(key string, value []byte) error
- func (m *TestStorage) Len() uint
- func (m *TestStorage) Remove(key string) error
- func (m *TestStorage) Retrieve(key string) ([]byte, error)
- func (m *TestStorage) Size() uint64
- type TestStoreBench
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestStorage ¶
type TestStorage struct {
// contains filtered or unexported fields
}
func NewTestStorage ¶
func NewTestStorage() *TestStorage
func (*TestStorage) Close ¶
func (m *TestStorage) Close()
func (*TestStorage) Flush ¶
func (m *TestStorage) Flush() error
func (*TestStorage) Len ¶
func (m *TestStorage) Len() uint
func (*TestStorage) Remove ¶
func (m *TestStorage) Remove(key string) error
func (*TestStorage) Size ¶
func (m *TestStorage) Size() uint64
Size will not be accurate for an in-memory Store
type TestStoreBench ¶
type TestStoreBench struct { Keys []string Store *TestStorage Size int }
func NewTestStoreBench ¶
func NewTestStoreBench() *TestStoreBench
func (*TestStoreBench) FillStore ¶
func (tsb *TestStoreBench) FillStore(insertFunc func(string, []byte) error, n int)
FillStore requires at least n mininum keys already in the TestStore - call MinSize first
func (*TestStoreBench) MinSize ¶
func (tsb *TestStoreBench) MinSize(n int)
Click to show internal directories.
Click to hide internal directories.