Documentation ¶
Index ¶
- Constants
- type CacheSet
- type RefCounter
- func (rc *RefCounter) AllKeysChan(ctx context.Context, count int64) (<-chan string, error)
- func (rc *RefCounter) Decr(key string) error
- func (rc *RefCounter) Get(key string) (int64, error)
- func (rc *RefCounter) Has(key string) (bool, error)
- func (rc *RefCounter) Incr(key string) error
- func (rc *RefCounter) IncrOrCreate(key string, createFunc func() error) error
- func (rc *RefCounter) Remove(key string, force bool) error
Constants ¶
View Source
const CachePrefix = "cache/"
View Source
const RefPrefix = "ref/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheSet ¶
type CacheSet struct {
// contains filtered or unexported fields
}
func NewCacheSet ¶
func (*CacheSet) AllKeysChan ¶
type RefCounter ¶
type RefCounter struct {
// contains filtered or unexported fields
}
func NewRefCounter ¶
func NewRefCounter(db *uleveldb.ULevelDB, cacheSet *CacheSet) *RefCounter
func (*RefCounter) AllKeysChan ¶
AllKeysChan query keys which reference count value equals count param
func (*RefCounter) Decr ¶
func (rc *RefCounter) Decr(key string) error
func (*RefCounter) Incr ¶
func (rc *RefCounter) Incr(key string) error
func (*RefCounter) IncrOrCreate ¶
func (rc *RefCounter) IncrOrCreate(key string, createFunc func() error) error
Click to show internal directories.
Click to hide internal directories.