Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue handles document indexing
func New ¶
func New( logger *zap.SugaredLogger, flushFunc func([]*Item) error, closeFunc func() error, opts Options, ) *Queue
New instantiates a new queue. flushFunc is is used for periodic index flusing, and closeFunc will be used when closing. flushFunc should add items with values, and delete items without values. Nil items are possible.
The goal is to batch index updates on a single thread.
func (*Queue) Close ¶
func (q *Queue) Close()
Close stops the queue runner and releases queue assets
Click to show internal directories.
Click to hide internal directories.