MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / recentRequestBucketIndex

Function recentRequestBucketIndex

sdk/cliproxy/auth/types.go:204–210  ·  view source on GitHub ↗
(bucketID int64)

Source from the content-addressed store, hash-verified

202}
203
204func recentRequestBucketIndex(bucketID int64) int {
205 mod := bucketID % int64(recentRequestBucketCount)
206 if mod < 0 {
207 mod += int64(recentRequestBucketCount)
208 }
209 return int(mod)
210}
211
212func formatRecentRequestBucketLabel(bucketID int64) string {
213 start := time.Unix(bucketID*recentRequestBucketSeconds, 0).In(time.Local)

Callers 2

recordRecentRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected