add request rate limiter

This commit is contained in:
ginuerzh
2022-09-14 19:53:21 +08:00
parent 45b7ac2021
commit 50d443049f
3 changed files with 26 additions and 6 deletions

View File

@ -49,6 +49,8 @@ func GetFloat(md metadata.Metadata, key string) (v float64) {
}
switch vv := md.Get(key).(type) {
case float64:
return vv
case int:
return float64(vv)
case string: