batchwriter

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncBatchWriter

type AsyncBatchWriter struct {
	BatchWrite func([]interface{})
	// contains filtered or unexported fields
}

func NewAsyncBatchWriter

func NewAsyncBatchWriter(nDesiredBatchSize int, buffsize int, maxWait time.Duration) *AsyncBatchWriter

func (*AsyncBatchWriter) Close

func (t *AsyncBatchWriter) Close()

make sure NO goroutine is calling PostMessage/PostMessageUnique before calling Close() otherwise sending data to a broken channel can cause panic

func (*AsyncBatchWriter) PostMessage

func (t *AsyncBatchWriter) PostMessage(msg interface{})

func (*AsyncBatchWriter) PostMessageUnique

func (t *AsyncBatchWriter) PostMessageUnique(key string, msg interface{})

type ElementT

type ElementT struct {
	// contains filtered or unexported fields
}

type SyncBatchWriter

type SyncBatchWriter struct {
	BatchWrite func([]interface{}) error
	// contains filtered or unexported fields
}

func NewSyncBatchWriter

func NewSyncBatchWriter(nDesiredBatchSize int, buffsize int, maxWait time.Duration) *SyncBatchWriter

func (*SyncBatchWriter) Close

func (t *SyncBatchWriter) Close()

make sure NO goroutine is calling SendMessage before calling Close() otherwise sending data to a broken channel can cause panic

func (*SyncBatchWriter) SendMessage

func (t *SyncBatchWriter) SendMessage(msg interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL