Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStoreWithOptions ¶
func NewStoreWithOptions(options limiter.StoreOptions) limiter.Store
NewStoreWithOptions creates a new instance of memory store with options.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache contains a collection of counters.
type CacheWrapper ¶
type CacheWrapper struct {
*Cache
}
CacheWrapper is used to ensure that the underlying cleaner goroutine used to clean expired keys will not prevent Cache from being garbage collected.
func NewCache ¶
func NewCache(cleanInterval time.Duration) *CacheWrapper
NewCache returns a new cache.
type Store ¶
type Store struct { // Prefix used for the key. Prefix string // contains filtered or unexported fields }
Store is the in-memory store.
Click to show internal directories.
Click to hide internal directories.