Documentation ¶
Index ¶
- Variables
- type Cache
- func (c *Cache) Decr(k []byte, delta int64) (n int64, err error)
- func (c *Cache) Exist(k []byte) bool
- func (c *Cache) Expire(k []byte, ttl time.Duration) (err error)
- func (c *Cache) Get(k []byte) ([]byte, bool)
- func (c *Cache) Incr(k []byte, delta int64) (n int64, err error)
- func (c *Cache) Remove(k []byte)
- func (c *Cache) Set(k []byte, v []byte) (err error)
- func (c *Cache) SetWithTTL(k []byte, v []byte, ttl time.Duration) (err error)
- type Hash
- type Increment
- type Increments
- func (increments *Increments) Decr(k uint64, delta int64) (n int64)
- func (increments *Increments) Expire(k uint64, ttl time.Duration)
- func (increments *Increments) Incr(k uint64, delta int64) (n int64)
- func (increments *Increments) Remove(k uint64)
- func (increments *Increments) Value(k uint64) (n int64, has bool)
- type Keys
- type LRU
- func (c *LRU[K, V]) Add(key K, value V, ttl time.Duration) (evicted bool)
- func (c *LRU[K, V]) Get(key K) (value V, ok bool)
- func (c *LRU[K, V]) Keys() []K
- func (c *LRU[K, V]) Len() int
- func (c *LRU[K, V]) Purge()
- func (c *LRU[K, V]) Remove(key K) (present bool)
- func (c *LRU[K, V]) Resize(size int64) (evicted int64)
- type MemHash
- type XXHash
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooBigKey = fmt.Errorf("key was too big, must not be greater than 63k") ErrInvalidKey = fmt.Errorf("key is invalid") )
Functions ¶
This section is empty.
Types ¶
type Increments ¶
type Increments struct {
// contains filtered or unexported fields
}
func (*Increments) Remove ¶
func (increments *Increments) Remove(k uint64)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.