| 97 | } |
| 98 | |
| 99 | type asyncProducer struct { |
| 100 | client Client |
| 101 | conf *Config |
| 102 | |
| 103 | errors chan *ProducerError |
| 104 | input, successes, retries chan *ProducerMessage |
| 105 | inFlight sync.WaitGroup |
| 106 | |
| 107 | brokers map[*Broker]*brokerProducer |
| 108 | brokerRefs map[*brokerProducer]int |
| 109 | brokerLock sync.Mutex |
| 110 | |
| 111 | txnmgr *transactionManager |
| 112 | txLock sync.Mutex |
| 113 | |
| 114 | // muter ensures per-partition ordering by preventing concurrent in-flight requests, |
| 115 | // mirroring Kafka's RecordAccumulator. |
| 116 | muter *partitionMuter |
| 117 | |
| 118 | metricsRegistry metrics.Registry |
| 119 | } |
| 120 | |
| 121 | type partitionMuter struct { |
| 122 | mu sync.Mutex |
nothing calls this directly
no outgoing calls
no test coverage detected