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

Function NewConsumerFromClient

consumer.go:122–127  ·  view source on GitHub ↗

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

(client Client)

Source from the content-addressed store, hash-verified

120// NewConsumerFromClient creates a new consumer using the given client. It is still
121// necessary to call Close() on the underlying client when shutting down this consumer.
122func NewConsumerFromClient(client Client) (Consumer, error) {
123 // For clients passed in by the client, ensure we don't
124 // call Close() on it.
125 cli := &nopCloserClient{client}
126 return newConsumer(cli)
127}
128
129func newConsumer(client Client) (Consumer, error) {
130 // Check that we are not dealing with a closed Client before processing any other arguments

Callers 6

TestInterceptorsFunction · 0.85
testProducingMessagesFunction · 0.85

Calls 1

newConsumerFunction · 0.85

Tested by 6

TestInterceptorsFunction · 0.68
testProducingMessagesFunction · 0.68