Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewListener ¶
func NewListener(batch Batch, batchSize int) listener.ItemListener
NewListener is an item listener to persist data
Types ¶
type Batch ¶
type Batch interface {
OnItems(items []interface{}) error
}
Batch represents a bulk of items to persist
type ItemListener ¶
type ItemListener struct {
// contains filtered or unexported fields
}
ItemListener listens to a given item
func (*ItemListener) Close ¶
func (listener *ItemListener) Close() error
Close closes the itemListener to remove any resources
func (*ItemListener) Commit ¶
func (listener *ItemListener) Commit() error
func (*ItemListener) OnItem ¶
func (listener *ItemListener) OnItem(item interface{}) error
OnItem listens to a given item
Click to show internal directories.
Click to hide internal directories.