AssertMaxNativeHistogramSeriesPerUser limit has not been reached compared to the current number of native histogram series in input and returns an error if so.
(userID string, series int)
| 99 | // AssertMaxNativeHistogramSeriesPerUser limit has not been reached compared to the current |
| 100 | // number of native histogram series in input and returns an error if so. |
| 101 | func (l *Limiter) AssertMaxNativeHistogramSeriesPerUser(userID string, series int) error { |
| 102 | if actualLimit := l.maxNativeHistogramSeriesPerUser(userID); series < actualLimit { |
| 103 | return nil |
| 104 | } |
| 105 | |
| 106 | return errMaxNativeHistogramSeriesPerUserLimitExceeded |
| 107 | } |
| 108 | |
| 109 | // AssertMaxMetricsWithMetadataPerUser limit has not been reached compared to the current |
| 110 | // number of metrics with metadata in input and returns an error if so. |