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