Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrKeyNotFound ¶
Types ¶
type ErrCASFailed ¶
type ErrCASFailed struct {
Key string
}
ErrCASFailed is returned when a Compare-And-Swap operation fails because the expected value did not match the actual value.
func (*ErrCASFailed) Error ¶
func (e *ErrCASFailed) Error() string
type ErrDataCorruption ¶
func (*ErrDataCorruption) Error ¶
func (e *ErrDataCorruption) Error() string
type ErrInternal ¶
type ErrInternal struct {
Err error
}
func (*ErrInternal) Error ¶
func (e *ErrInternal) Error() string
func (*ErrInternal) Unwrap ¶
func (e *ErrInternal) Unwrap() error
type ErrInvalidState ¶
ErrInvalidState is returned when an operation encounters data in an unexpected format.
func (*ErrInvalidState) Error ¶
func (e *ErrInvalidState) Error() string
type ErrKeyExists ¶
type ErrKeyExists struct {
Key string
}
func (*ErrKeyExists) Error ¶
func (e *ErrKeyExists) Error() string
type ErrKeyNotFound ¶
type ErrKeyNotFound struct {
Key string
}
func (*ErrKeyNotFound) Error ¶
func (e *ErrKeyNotFound) Error() string
type TKV ¶
type TKV interface {
TKVDataHandler
TKVCacheHandler
TKVBatchHandler
Close() error
GetDataDB() *badger.DB
GetCache() *badger.DB
}
type TKVBatchEntry ¶
type TKVBatchHandler ¶
type TKVBatchHandler interface {
BatchSet(entries []TKVBatchEntry) error
BatchDelete(keys []string) error
}
type TKVCacheHandler ¶
type TKVCacheHandler interface {
CacheGet(key string) (string, error)
CacheSet(key string, value string) error
CacheDelete(key string) error
CacheSetNX(key string, value string) error
CacheCompareAndSwap(key string, oldValue, newValue string) error
CacheIterate(prefix string, offset int, limit int, trimPrefix string) ([]string, error)
}
type TKVDataHandler ¶
type TKVDataHandler interface {
Get(key string) (string, error)
Iterate(prefix string, offset int, limit int, trimPrefix string) ([]string, error)
Set(key string, value string) error
Delete(key string) error
SetNX(key string, value string) error
CompareAndSwap(key string, oldValue, newValue string) error
BumpInteger(key string, delta int64) error
}
Click to show internal directories.
Click to hide internal directories.