BatcherWithBatchSize sets the number of stats to store in a batch.
(size int)
| 65 | |
| 66 | // BatcherWithBatchSize sets the number of stats to store in a batch. |
| 67 | func BatcherWithBatchSize(size int) BatcherOption { |
| 68 | return func(b *DBBatcher) { |
| 69 | b.batchSize = size |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // BatcherWithInterval sets the interval for flushes. |
| 74 | func BatcherWithInterval(d time.Duration) BatcherOption { |
no outgoing calls