Versions in this module Expand all Collapse all v0 v0.0.2 Jun 24, 2022 v0.0.1 May 30, 2022 Changes in this version + var ErrBatchWriterAtivelyClose = errors.New("batchwriter: writer close actively") + var ErrBatchWriterClosed = errors.New("batchwriter: writer was closed") + var ErrBatchWriterTooManyWrite = errors.New("batchwriter: writer wrote too fast") + func BatchWrite(v interface{}) + type BatchWriter struct + func NewBatchWriter(o *Option, w io.Writer) (*BatchWriter, error) + func (bw *BatchWriter) Close() error + func (bw *BatchWriter) DoWrite() error + func (bw *BatchWriter) DoWritev() error + func (bw *BatchWriter) GetBytesWritten() int64 + func (bw *BatchWriter) GetInflightsCap() int + func (bw *BatchWriter) GetInflightsLen() int + func (bw *BatchWriter) GetNumRequests() int64 + func (bw *BatchWriter) GetPendingRequests() int64 + func (bw *BatchWriter) IsClosed() bool + func (bw *BatchWriter) Write(d []byte) (int, error) + type Option struct + func NewOption() *Option + func (o *Option) BlockWriteForever() *Option + func (o *Option) SetMaxFlushDelay(d time.Duration) *Option + func (o *Option) SetMaxinflights(max int) *Option + func (o *Option) SetNumRequests(i64 *int64) *Option + func (o *Option) SetNumWrite(i64 *int64) *Option + func (o *Option) SetPendingRequests(i64 *int64) *Option + func (o *Option) SetTimeout(d time.Duration) *Option + func (o *Option) SetWorkerPool(wp *workerpool.WorkerPool) *Option + func (o *Option) SetWriteMode(m WriteMode) *Option + type WriteMode uint8 + const BatchWriteMode + const FlushWriteMode + const ManualWriteMode