Documentation
¶
Index ¶
- func NewLockedSource(seed int64) *lockedSource
- type DataStore
- func (d *DataStore) Add(key string, value []byte, exp int64, flags int32) error
- func (d *DataStore) Append(key string, value []byte) error
- func (d *DataStore) Cas(key string, value []byte, exp, cas int64, flags int32) error
- func (d *DataStore) Contains(key string) bool
- func (d *DataStore) Decrement(key string, amount int64) (int64, error)
- func (d *DataStore) Delete(key string) error
- func (d *DataStore) Destroy() error
- func (d *DataStore) Get(key string) (*KeyData, error)
- func (d *DataStore) Increment(key string, amount int64) (int64, error)
- func (d *DataStore) List() []string
- func (d *DataStore) Prepend(key string, value []byte) error
- func (d *DataStore) Replace(key string, value []byte, exp int64, flags int32) error
- func (d *DataStore) Set(key string, value []byte, exp int64, flags int32) error
- func (d *DataStore) Touch(key string, exp int64) error
- type Item
- type KeyData
- type TtlHeap
- func (t *TtlHeap) Contains(key string) bool
- func (t *TtlHeap) Peek() (Item, error)
- func (t *TtlHeap) Pop() (*Item, error)
- func (t *TtlHeap) Push(key string, time int64) error
- func (t *TtlHeap) Remove(key string) error
- func (t *TtlHeap) Size() int
- func (t *TtlHeap) Update(key string, time int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLockedSource ¶
func NewLockedSource(seed int64) *lockedSource
Types ¶
type DataStore ¶
type DataStore struct {
// contains filtered or unexported fields
}
DataStore is a key store that supports TTL's and LRU eviction.
func (*DataStore) Decrement ¶
Decrement the key if it was previously set and is a number, will not go below zero. Returns the new value or an error.
func (*DataStore) Destroy ¶
Destroy removes all temp files and cleanly exits all goroutines created.
func (*DataStore) Increment ¶
Increment the key if it was previously set and is a number. Returns the new value or an error.
type TtlHeap ¶
type TtlHeap struct {
// contains filtered or unexported fields
}
func NewTtlHeap ¶
func NewTtlHeap() *TtlHeap
Click to show internal directories.
Click to hide internal directories.