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

Function recentRequestBucketID

sdk/cliproxy/auth/types.go:197–202  ·  view source on GitHub ↗
(now time.Time)

Source from the content-addressed store, hash-verified

195}
196
197func recentRequestBucketID(now time.Time) int64 {
198 if now.IsZero() {
199 return 0
200 }
201 return now.Unix() / recentRequestBucketSeconds
202}
203
204func recentRequestBucketIndex(bucketID int64) int {
205 mod := bucketID % int64(recentRequestBucketCount)

Callers 2

recordRecentRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected