(count int)
| 119 | } |
| 120 | |
| 121 | func (ql *QueryLimiter) AddChunks(count int) error { |
| 122 | if ql.maxChunksPerQuery == 0 { |
| 123 | return nil |
| 124 | } |
| 125 | |
| 126 | if ql.chunkCount.Add(int64(count)) > int64(ql.maxChunksPerQuery) { |
| 127 | return fmt.Errorf(ErrMaxChunksPerQueryLimit, ql.maxChunksPerQuery) |
| 128 | } |
| 129 | return nil |
| 130 | } |
no test coverage detected