BatcherWithInterval sets the interval for flushes.
(d time.Duration)
| 72 | |
| 73 | // BatcherWithInterval sets the interval for flushes. |
| 74 | func BatcherWithInterval(d time.Duration) BatcherOption { |
| 75 | return func(b *DBBatcher) { |
| 76 | b.interval = d |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // BatcherWithLogger sets the logger to use for logging. |
| 81 | func BatcherWithLogger(log slog.Logger) BatcherOption { |
no outgoing calls