()
| 139 | } |
| 140 | |
| 141 | func (s *Spec) batchingEnabled() bool { |
| 142 | if s.NoRotate { |
| 143 | // if that's set we don't allow batching |
| 144 | return false |
| 145 | } |
| 146 | |
| 147 | return (s.BatchSize == nil || *s.BatchSize > 0) || |
| 148 | (s.BatchSizeBytes == nil || *s.BatchSizeBytes > 0) || |
| 149 | (s.BatchTimeout == nil || s.BatchTimeout.Duration() > 0) |
| 150 | } |
| 151 | |
| 152 | func ptr[A any](a A) *A { |
| 153 | return &a |