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

Function formatRecentRequestBucketLabel

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

Source from the content-addressed store, hash-verified

210}
211
212func formatRecentRequestBucketLabel(bucketID int64) string {
213 start := time.Unix(bucketID*recentRequestBucketSeconds, 0).In(time.Local)
214 end := start.Add(time.Duration(recentRequestBucketSeconds) * time.Second)
215 return start.Format("15:04") + "-" + end.Format("15:04")
216}
217
218func (a *Auth) recordRecentRequest(now time.Time, success bool) {
219 if a == nil {

Callers 1

Calls 1

FormatMethod · 0.80

Tested by

no test coverage detected