Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTimeout indicates an operation has timed out. ErrTimeout = errors.New("operation timed-out") )
Functions ¶
This section is empty.
Types ¶
type Buffer ¶ added in v1.1.0
Buffer represents a data buffer that is asynchronously flushed, either manually or automatically.
func (*Buffer) Close ¶ added in v1.1.0
Close flushes the buffer and prevents it from being further used. If it succeeds, the buffer cannot be used after it has been closed as all further operations will panic.
type Flusher ¶ added in v1.2.0
type Flusher interface {
Write(items []interface{})
}
Flusher represents a destination of buffered data.
type FlusherFunc ¶ added in v1.2.0
type FlusherFunc func(items []interface{})
FlusherFunc represents a flush function.
func (FlusherFunc) Write ¶ added in v1.2.0
func (fn FlusherFunc) Write(items []interface{})
type Option ¶ added in v1.1.0
type Option func(*Options)
Option setter.
func WithCloseTimeout ¶ added in v1.1.0
WithCloseTimeout sets how long
func WithFlushInterval ¶ added in v1.2.0
WithFlushInterval sets the interval between automatic flushes.
func WithFlushTimeout ¶ added in v1.1.0
WithFlushTimeout sets how long a manual flush should wait before giving up.
func WithFlusher ¶ added in v1.2.0
WithFlusher sets the flusher that should be used to write out the buffer.
func WithPushTimeout ¶ added in v1.1.0
WithPushTimeout sets how long a push should wait before giving up.