diff options
| author | 2025-03-09 17:47:56 +0100 | |
|---|---|---|
| committer | 2025-12-01 22:08:04 +0100 | |
| commit | b1af8fd87760b34e3ff2fd3bda38f211815a0473 (patch) | |
| tree | 9317fad1a7ec298d7a8d2678e4e422953bbc6f33 /vendor/github.com/ulule/limiter/v3/store.go | |
| parent | [chore] update URLs to forked source (diff) | |
| download | gotosocial-b1af8fd87760b34e3ff2fd3bda38f211815a0473.tar.xz | |
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/ulule/limiter/v3/store.go')
| -rw-r--r-- | vendor/github.com/ulule/limiter/v3/store.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/ulule/limiter/v3/store.go b/vendor/github.com/ulule/limiter/v3/store.go deleted file mode 100644 index 9fdb3aa04..000000000 --- a/vendor/github.com/ulule/limiter/v3/store.go +++ /dev/null @@ -1,34 +0,0 @@ -package limiter - -import ( - "context" - "time" -) - -// Store is the common interface for limiter stores. -type Store interface { - // Get returns the limit for given identifier. - Get(ctx context.Context, key string, rate Rate) (Context, error) - // Peek returns the limit for given identifier, without modification on current values. - Peek(ctx context.Context, key string, rate Rate) (Context, error) - // Reset resets the limit to zero for given identifier. - Reset(ctx context.Context, key string, rate Rate) (Context, error) - // Increment increments the limit by given count & gives back the new limit for given identifier - Increment(ctx context.Context, key string, count int64, rate Rate) (Context, error) -} - -// StoreOptions are options for store. -type StoreOptions struct { - // Prefix is the prefix to use for the key. - Prefix string - - // MaxRetry is the maximum number of retry under race conditions on redis store. - // Deprecated: this option is no longer required since all operations are atomic now. - MaxRetry int - - // CleanUpInterval is the interval for cleanup (run garbage collection) on stale entries on memory store. - // Setting this to a low value will optimize memory consumption, but will likely - // reduce performance and increase lock contention. - // Setting this to a high value will maximum throughput, but will increase the memory footprint. - CleanUpInterval time.Duration -} |
