MCPcopy
hub / github.com/elastic/go-elasticsearch / flush

Method flush

esutil/bulk_indexer.go:672–679  ·  view source on GitHub ↗

flush writes out the worker buffer and handles errors. It also restarts the ticker. Returns true to indicate success.

(ctx context.Context)

Source from the content-addressed store, hash-verified

670// It also restarts the ticker.
671// Returns true to indicate success.
672func (w *worker) flush(ctx context.Context) bool {
673 ok := true
674 if err := w.flushBuffer(ctx); err != nil {
675 ok = false
676 }
677 w.ticker.Reset(w.bi.nextFlushInterval())
678 return ok
679}
680
681// flushBuffer writes out the worker buffer.
682//

Callers 1

runMethod · 0.95

Calls 2

flushBufferMethod · 0.95
nextFlushIntervalMethod · 0.80

Tested by

no test coverage detected