(group string)
| 34 | } |
| 35 | |
| 36 | func GetGroupRateLimit(group string) (totalCount, successCount int, found bool) { |
| 37 | ModelRequestRateLimitMutex.RLock() |
| 38 | defer ModelRequestRateLimitMutex.RUnlock() |
| 39 | |
| 40 | if ModelRequestRateLimitGroup == nil { |
| 41 | return 0, 0, false |
| 42 | } |
| 43 | |
| 44 | limits, found := ModelRequestRateLimitGroup[group] |
| 45 | if !found { |
| 46 | return 0, 0, false |
| 47 | } |
| 48 | return limits[0], limits[1], true |
| 49 | } |
| 50 | |
| 51 | func CheckModelRequestRateLimitGroup(jsonStr string) error { |
| 52 | checkModelRequestRateLimitGroup := make(map[string][2]int) |
no outgoing calls
no test coverage detected