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

Method send

broker.go:1080–1093  ·  view source on GitHub ↗

b.lock must be held by caller a non-nil res results in a response promise being created

(req, res protocolBody)

Source from the content-addressed store, hash-verified

1078//
1079// a non-nil res results in a response promise being created
1080func (b *Broker) send(req, res protocolBody) (*responsePromise, error) {
1081 var promise *responsePromise
1082 if res != nil {
1083 // Packets or error will be sent to the following channels
1084 // once the response is received
1085 promise = makeResponsePromise(res)
1086 }
1087
1088 if err := b.sendWithPromise(req, promise); err != nil {
1089 return nil, err
1090 }
1091
1092 return promise, nil
1093}
1094
1095func makeResponsePromise(res protocolBody) *responsePromise {
1096 promise := &responsePromise{

Callers 2

sendAndReceiveMethod · 0.95
sendOffsetCommitFunction · 0.80

Calls 2

sendWithPromiseMethod · 0.95
makeResponsePromiseFunction · 0.85

Tested by

no test coverage detected