MSP-4558 replace redis cli with isp-lock-service
This commit is contained in:
1 parent
6491e79afd
commit
e7bfd34e9e
14 files changed
+152
-234
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type IncrementRequest struct {
|
||||
Key string
|
||||
Today time.Time
|
||||
}
|
||||
|
||||
type IncrementResponse struct {
|
||||
Value uint64
|
||||
}
|
||||
|
||||
type RateLimiterRequest struct {
|
||||
Key string
|
||||
MaxRps int
|
||||
}
|
||||
|
||||
type RateLimiterResponse struct {
|
||||
Allow bool
|
||||
Remaining int
|
||||
RetryAfter time.Duration
|
||||
}
|
||||
Reference in new issue
Block a user