Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultExpiration = time.Minute
Functions ¶
This section is empty.
Types ¶
type RefCounter ¶
type RefCounter struct {
// contains filtered or unexported fields
}
RefCounter allows to throttle based on reference counter.
func NewRefCounter ¶
func NewRefCounter(client *redis.Client, quota int64) *RefCounter
func (*RefCounter) SafeUnref ¶
func (rc *RefCounter) SafeUnref(key string)
func (*RefCounter) UnrefAsync ¶
func (rc *RefCounter) UnrefAsync(key string)
Click to show internal directories.
Click to hide internal directories.