BatcherWithLogger sets the logger to use for logging.
(log slog.Logger)
| 79 | |
| 80 | // BatcherWithLogger sets the logger to use for logging. |
| 81 | func BatcherWithLogger(log slog.Logger) BatcherOption { |
| 82 | return func(b *DBBatcher) { |
| 83 | b.log = log |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // NewBatcher creates a new Batcher and starts it. |
| 88 | func NewBatcher(ctx context.Context, opts ...BatcherOption) (*DBBatcher, func(), error) { |
no outgoing calls