| 291 | } |
| 292 | |
| 293 | type bulkIndexer struct { |
| 294 | wg sync.WaitGroup |
| 295 | workers []*worker |
| 296 | stats *bulkIndexerStats |
| 297 | |
| 298 | config BulkIndexerConfig |
| 299 | ownedClient *elasticsearch.BaseClient // non-nil when NewBulkIndexer auto-created the client; closed by Close |
| 300 | addCounter atomic.Uint64 // round-robin dispatch counter for Add() |
| 301 | flushMu sync.Mutex // serialises Flush() and Close() |
| 302 | closed atomic.Bool // set by Close() |
| 303 | } |
| 304 | |
| 305 | type bulkIndexerStats struct { |
| 306 | numAdded uint64 |
nothing calls this directly
no outgoing calls
no test coverage detected