()
| 290 | } |
| 291 | |
| 292 | func (s *Spec) batchingEnabled() bool { |
| 293 | if s.NoRotate { |
| 294 | // if that's set we don't allow batching |
| 295 | return false |
| 296 | } |
| 297 | |
| 298 | return (s.BatchSize == nil || *s.BatchSize > 0) || |
| 299 | (s.BatchSizeBytes == nil || *s.BatchSizeBytes > 0) || |
| 300 | (s.BatchTimeout == nil || s.BatchTimeout.Duration() > 0) |
| 301 | } |
| 302 | |
| 303 | func ptr[A any](a A) *A { |
| 304 | return &a |