Documentation ¶
Index ¶
- Variables
- func ApplyConfig(cfg *IteratorConfig, opts ...IteratorOption)
- func DoTransaction(store TransactionStore, ctx context.Context, f func(txn Transaction) error) error
- type Iterator
- type IteratorConfig
- type IteratorOption
- type Store
- type StoreSuite
- type TTLStoreSuite
- type Transaction
- type TransactionStore
- type TransactionSuite
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyNotFound = &errors.Error{Code: ecode.ErrKvNotFound, HTTPStatusCode: http.StatusContinue, Description: "Kv not found"}
)
Functions ¶
func ApplyConfig ¶
func ApplyConfig(cfg *IteratorConfig, opts ...IteratorOption)
func DoTransaction ¶
func DoTransaction(store TransactionStore, ctx context.Context, f func(txn Transaction) error) error
Types ¶
type IteratorConfig ¶
type IteratorConfig struct {
Prefix []byte
}
type IteratorOption ¶
type IteratorOption interface {
// contains filtered or unexported methods
}
func WithPrefix ¶
func WithPrefix(prefix []byte) IteratorOption
WithPrefix returns an IteratorOption that sets the prefix for an iterator. This option configures the iterator to only access items that have the specified prefix. A prefix is a slice of bytes that the keys of items should start with in order to be included in the iteration.
type StoreSuite ¶
func (*StoreSuite) TestIterator ¶
func (s *StoreSuite) TestIterator()
func (*StoreSuite) TestKV ¶
func (s *StoreSuite) TestKV()
type TTLStoreSuite ¶
func (*TTLStoreSuite) TestKV ¶
func (s *TTLStoreSuite) TestKV()
type Transaction ¶
type TransactionStore ¶
type TransactionStore interface { Store NewTransaction() (Transaction, error) }
type TransactionSuite ¶
type TransactionSuite struct { StoreSuite Store TransactionStore }
func (*TransactionSuite) SetupTest ¶
func (s *TransactionSuite) SetupTest()
func (*TransactionSuite) TestTransaction ¶
func (s *TransactionSuite) TestTransaction()
func (*TransactionSuite) TestTransactionConflict ¶
func (s *TransactionSuite) TestTransactionConflict()
func (*TransactionSuite) TestTransactionConsistency ¶
func (s *TransactionSuite) TestTransactionConsistency()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.