AssertMaxMetricsWithMetadataPerUser limit has not been reached compared to the current number of metrics with metadata in input and returns an error if so.
(userID string, metrics int)
| 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. |
| 111 | func (l *Limiter) AssertMaxMetricsWithMetadataPerUser(userID string, metrics int) error { |
| 112 | if actualLimit := l.maxMetadataPerUser(userID); metrics < actualLimit { |
| 113 | return nil |
| 114 | } |
| 115 | |
| 116 | return errMaxMetadataPerUserLimitExceeded |
| 117 | } |
| 118 | |
| 119 | // AssertMaxSeriesPerLabelSet limit has not been reached compared to the current |
| 120 | // number of metrics with metadata in input and returns an error if so. |