Skip to content

Commit

Permalink
更新 frequency_control.go
Browse files Browse the repository at this point in the history
transfer to I18N
  • Loading branch information
PolarishT committed Jun 30, 2023
1 parent 0a3a1aa commit 4100952
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/internal/middleware/frequency_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
// define rate limit struct
type frequencyControlByTokenBucket struct {
refreshRate float64 // 令牌的刷新速率
capacity int64 // 桶的容量
tokens float64 // 当前令牌数量
lastToken time.Time // 上一次放令牌的时间
mtx sync.Mutex // 互斥锁
capacity int64 // bucket's capacity
tokens float64 // tokens' count
lastToken time.Time //latest time token stored
mtx sync.Mutex // mutex
}

// allow frequency
Expand Down

0 comments on commit 4100952

Please sign in to comment.