(userID string)
| 279 | } |
| 280 | |
| 281 | func (l *Limiter) maxMetadataPerUser(userID string) int { |
| 282 | return l.maxByLocalAndGlobal( |
| 283 | userID, |
| 284 | l.limits.MaxLocalMetricsWithMetadataPerUser, |
| 285 | l.limits.MaxGlobalMetricsWithMetadataPerUser, |
| 286 | ) |
| 287 | } |
| 288 | |
| 289 | func (l *Limiter) maxByLocalAndGlobal(userID string, localLimitFn, globalLimitFn func(string) int) int { |
| 290 | localLimit := localLimitFn(userID) |