Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBase64 ¶
RandomBase64 creates a random string of the length passed in
Types ¶
type CappedZSet ¶
type CappedZSet struct {
// contains filtered or unexported fields
}
CappedZSet is a sorted set but enforces a cap on size
func NewCappedZSet ¶
func NewCappedZSet(key string, cap int, expire time.Duration) *CappedZSet
NewCappedZSet creates a new capped sorted set
type IntervalHash ¶
type IntervalHash struct {
// contains filtered or unexported fields
}
IntervalHash operates like a hash map but with expiring intervals
func NewIntervalHash ¶
func NewIntervalHash(keyBase string, interval time.Duration, size int) *IntervalHash
NewIntervalHash creates a new empty interval hash
func (*IntervalHash) ClearAll ¶
func (h *IntervalHash) ClearAll(rc redis.Conn) error
ClearAll removes all values
type IntervalSeries ¶
type IntervalSeries struct {
// contains filtered or unexported fields
}
IntervalSeries returns all values from interval based hashes.
func NewIntervalSeries ¶
func NewIntervalSeries(keyBase string, interval time.Duration, size int) *IntervalSeries
NewIntervalSeries creates a new empty series
type IntervalSet ¶
type IntervalSet struct {
// contains filtered or unexported fields
}
IntervalSet operates like a set but with expiring intervals
func NewIntervalSet ¶
func NewIntervalSet(keyBase string, interval time.Duration, size int) *IntervalSet
NewIntervalSet creates a new empty interval set
func (*IntervalSet) Add ¶
func (s *IntervalSet) Add(rc redis.Conn, member string) error
Add adds the given value
func (*IntervalSet) ClearAll ¶
func (s *IntervalSet) ClearAll(rc redis.Conn) error
ClearAll removes all values
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
func (*Locker) Extend ¶
Extend extends our lock expiration by the passed in number of seconds provided the lock value is correct