(jsonStr string)
| 26 | } |
| 27 | |
| 28 | func UpdateModelRequestRateLimitGroupByJSONString(jsonStr string) error { |
| 29 | ModelRequestRateLimitMutex.RLock() |
| 30 | defer ModelRequestRateLimitMutex.RUnlock() |
| 31 | |
| 32 | ModelRequestRateLimitGroup = make(map[string][2]int) |
| 33 | return json.Unmarshal([]byte(jsonStr), &ModelRequestRateLimitGroup) |
| 34 | } |
| 35 | |
| 36 | func GetGroupRateLimit(group string) (totalCount, successCount int, found bool) { |
| 37 | ModelRequestRateLimitMutex.RLock() |