Versions in this module Expand all Collapse all v2 v2.0.0 Sep 8, 2020 Changes in this version + var ErrClosed = errors.New("buffer is closed") + var ErrTimeout = errors.New("operation timed-out") + type Buffer struct + func New(opts ...Option) *Buffer + func (buffer *Buffer) Close() error + func (buffer *Buffer) Flush() error + func (buffer *Buffer) Push(item interface{}) error + type Flusher interface + Write func(items []interface{}) + type FlusherFunc func(items []interface{}) + func (fn FlusherFunc) Write(items []interface{}) + type Option func(*Options) + func WithCloseTimeout(timeout time.Duration) Option + func WithFlushInterval(interval time.Duration) Option + func WithFlushTimeout(timeout time.Duration) Option + func WithFlusher(flusher Flusher) Option + func WithPushTimeout(timeout time.Duration) Option + func WithSize(size uint) Option + type Options struct + CloseTimeout time.Duration + FlushInterval time.Duration + FlushTimeout time.Duration + Flusher Flusher + PushTimeout time.Duration + Size uint Other modules containing this package github.com/globocom/go-buffer