in bulk_indexer_pool.go [181:194]
func (p *BulkIndexerPool) Register(id string) {
if id == "" {
return // No ID to register.
}
p.mu.Lock()
defer p.mu.Unlock()
if _, exists := p.entries[id]; exists {
return
}
p.entries[id] = idEntry{
nonEmpty: make(chan *BulkIndexer, p.max),
leased: new(atomic.Int64),
}
}