Skip to content

Commit 192ccb6

Browse files
committed
feat: implement io.WriteCloser
1 parent 5a2e980 commit 192ccb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

buffer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"io"
78
"os"
89
"time"
910
)
@@ -45,6 +46,7 @@ func DefaultErrHandler[T any](err error, elements []T) {
4546
//
4647
// If both Threshold and FlushInterval are set to zero, Writing is Flushing.
4748
type Option[T any] struct {
49+
io.WriteCloser
4850
// Threshold indicates that the buffer is large enough to trigger flushing,
4951
// if Threshold is zero, do not judge threshold.
5052
Threshold uint32

0 commit comments

Comments
 (0)