MCPcopy
hub / github.com/IBM/sarama / NewAsyncProducerFromClient

Function NewAsyncProducerFromClient

async_producer.go:292–297  ·  view source on GitHub ↗

NewAsyncProducerFromClient creates a new Producer using the given client. It is still necessary to call Close() on the underlying client when shutting down this producer.

(client Client)

Source from the content-addressed store, hash-verified

290// NewAsyncProducerFromClient creates a new Producer using the given client. It is still
291// necessary to call Close() on the underlying client when shutting down this producer.
292func NewAsyncProducerFromClient(client Client) (AsyncProducer, error) {
293 // For clients passed in by the client, ensure we don't
294 // call Close() on it.
295 cli := &nopCloserClient{client}
296 return newAsyncProducer(cli)
297}
298
299func newAsyncProducer(client Client) (AsyncProducer, error) {
300 // Check that we are not dealing with a closed Client before processing any other arguments

Calls 1

newAsyncProducerFunction · 0.85