diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-06-21 13:10:40 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-06-21 16:10:40 -0400 |
commit | 8526739066ccb00ccd24b74650a7d7b284442985 (patch) | |
tree | 282512ae2ad95c98a9ca82de304a410b6b56685c /vendor/gopkg.in/throttled/throttled.v2/store.go | |
parent | a59ccaa8b3844895dde3980e6224fef46ff4a1c8 (diff) | |
download | chat-8526739066ccb00ccd24b74650a7d7b284442985.tar.gz chat-8526739066ccb00ccd24b74650a7d7b284442985.tar.bz2 chat-8526739066ccb00ccd24b74650a7d7b284442985.zip |
MM-10934 Update server dependencies. (#8981)
* Changing throttled import path.
* Upgrading dependencies.
Diffstat (limited to 'vendor/gopkg.in/throttled/throttled.v2/store.go')
-rw-r--r-- | vendor/gopkg.in/throttled/throttled.v2/store.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/gopkg.in/throttled/throttled.v2/store.go b/vendor/gopkg.in/throttled/throttled.v2/store.go deleted file mode 100644 index a26bbc2c5..000000000 --- a/vendor/gopkg.in/throttled/throttled.v2/store.go +++ /dev/null @@ -1,34 +0,0 @@ -package throttled - -import ( - "time" -) - -// GCRAStore is the interface to implement to store state for a GCRA -// rate limiter -type GCRAStore interface { - // GetWithTime returns the value of the key if it is in the store - // or -1 if it does not exist. It also returns the current time at - // the Store. The time must be representable as a positive int64 - // of nanoseconds since the epoch. - // - // GCRA assumes that all instances sharing the same Store also - // share the same clock. Using separate clocks will work if the - // skew is small but not recommended in practice unless you're - // lucky enough to be hooked up to GPS or atomic clocks. - GetWithTime(key string) (int64, time.Time, error) - - // SetIfNotExistsWithTTL sets the value of key only if it is not - // already set in the store it returns whether a new value was - // set. If the store supports expiring keys and a new value was - // set, the key will expire after the provided ttl. - SetIfNotExistsWithTTL(key string, value int64, ttl time.Duration) (bool, error) - - // CompareAndSwapWithTTL atomically compares the value at key to - // the old value. If it matches, it sets it to the new value and - // returns true. Otherwise, it returns false. If the key does not - // exist in the store, it returns false with no error. If the - // store supports expiring keys and the swap succeeded, the key - // will expire after the provided ttl. - CompareAndSwapWithTTL(key string, old, new int64, ttl time.Duration) (bool, error) -} |