Documentation ¶
Index ¶
- Variables
- type FileStore
- func (s *FileStore) Close() error
- func (s *FileStore) Connect() (err error)
- func (s *FileStore) Delete(key string) error
- func (s *FileStore) Get(key string) ([]byte, error)
- func (s *FileStore) GetPrefix(prefix string, offset, limit int) ([]*KeyValue, error)
- func (s *FileStore) IterateTxnPrefix(prefix string, fn func(StorageTxn, string) error) error
- func (s *FileStore) IterateValuesPrefix(prefix string, fn func(string, []byte) error) error
- func (s *FileStore) Set(key string, value []byte) error
- func (s *FileStore) Txn(write bool, fn func(StorageTxn) error) error
- type FileStoreConfig
- type FileStoreTxn
- func (tx *FileStoreTxn) Delete(key string) error
- func (tx *FileStoreTxn) Get(key string) ([]byte, error)
- func (s *FileStoreTxn) GetPrefix(prefix string, offset, limit int) ([]*KeyValue, error)
- func (tx *FileStoreTxn) IterateTxnPrefix(prefix string, fn func(StorageTxn, string) error) error
- func (tx *FileStoreTxn) IterateValuesPrefix(prefix string, fn func(string, []byte) error) error
- func (tx *FileStoreTxn) Set(key string, value []byte) error
- type KeyValue
- type MemStore
- func (m *MemStore) Close() error
- func (m *MemStore) Connect() error
- func (m *MemStore) Delete(key string) error
- func (m *MemStore) Get(key string) ([]byte, error)
- func (m *MemStore) GetPrefix(prefix string, offset, limit int) ([]*KeyValue, error)
- func (m *MemStore) IterateTxnPrefix(prefix string, fn func(StorageTxn, string) error) error
- func (m *MemStore) IterateValuesPrefix(prefix string, fn func(string, []byte) error) error
- func (m *MemStore) Set(key string, value []byte) error
- func (m *MemStore) Txn(write bool, fn func(StorageTxn) error) error
- type MemStoreConfig
- type MemStoreTxn
- func (t *MemStoreTxn) Delete(key string) error
- func (t *MemStoreTxn) Get(key string) ([]byte, error)
- func (t *MemStoreTxn) GetPrefix(prefix string, offset int, limit int) ([]*KeyValue, error)
- func (t *MemStoreTxn) IterateTxnPrefix(prefix string, fn func(txn StorageTxn, key string) error) error
- func (t *MemStoreTxn) IterateValuesPrefix(prefix string, fn func(key string, val []byte) error) error
- func (t *MemStoreTxn) Set(key string, value []byte) error
- type Storage
- type StorageTxn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTxnReadOnly is returned when the transaction is read only. ErrTxnReadOnly error = errors.New("transaction is read only") )
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func NewFileStore ¶
func NewFileStore(fsConfig *FileStoreConfig) *FileStore
func (*FileStore) IterateTxnPrefix ¶
func (*FileStore) IterateValuesPrefix ¶
type FileStoreConfig ¶
type FileStoreTxn ¶
type FileStoreTxn struct {
// contains filtered or unexported fields
}
func (*FileStoreTxn) Delete ¶
func (tx *FileStoreTxn) Delete(key string) error
func (*FileStoreTxn) GetPrefix ¶
func (s *FileStoreTxn) GetPrefix(prefix string, offset, limit int) ([]*KeyValue, error)
func (*FileStoreTxn) IterateTxnPrefix ¶
func (tx *FileStoreTxn) IterateTxnPrefix(prefix string, fn func(StorageTxn, string) error) error
func (*FileStoreTxn) IterateValuesPrefix ¶
type MemStore ¶ added in v0.11.0
type MemStore struct {
// contains filtered or unexported fields
}
func NewMemStore ¶ added in v0.11.0
func NewMemStore(cfg *MemStoreConfig) *MemStore
func (*MemStore) IterateTxnPrefix ¶ added in v0.11.0
func (*MemStore) IterateValuesPrefix ¶ added in v0.11.0
type MemStoreConfig ¶ added in v0.11.0
type MemStoreTxn ¶ added in v0.11.0
type MemStoreTxn struct {
// contains filtered or unexported fields
}
func (*MemStoreTxn) Delete ¶ added in v0.11.0
func (t *MemStoreTxn) Delete(key string) error
func (*MemStoreTxn) IterateTxnPrefix ¶ added in v0.11.0
func (t *MemStoreTxn) IterateTxnPrefix(prefix string, fn func(txn StorageTxn, key string) error) error
func (*MemStoreTxn) IterateValuesPrefix ¶ added in v0.11.0
type Storage ¶
type Storage interface { StorageTxn Txn(write bool, fn func(txn StorageTxn) error) error Connect() error Close() error }
type StorageTxn ¶
type StorageTxn interface { Get(string) ([]byte, error) Set(string, []byte) error IterateValuesPrefix(prefix string, fn func(key string, val []byte) error) error IterateTxnPrefix(prefix string, fn func(txn StorageTxn, key string) error) error GetPrefix(prefix string, offset, limit int) ([]*KeyValue, error) Delete(string) error }
Click to show internal directories.
Click to hide internal directories.