saslAuthenticate sends the SASL authenticate message. This function must be immediately preceded by a successful saslHandshake. See http://kafka.apache.org/protocol.html#The_Messages_SaslAuthenticate
(pc *protocol.Conn, data []byte)
| 1347 | // |
| 1348 | // See http://kafka.apache.org/protocol.html#The_Messages_SaslAuthenticate |
| 1349 | func saslAuthenticateRoundTrip(pc *protocol.Conn, data []byte) ([]byte, error) { |
| 1350 | msg, err := pc.RoundTrip(&saslauthenticate.Request{ |
| 1351 | AuthBytes: data, |
| 1352 | }) |
| 1353 | if err != nil { |
| 1354 | return nil, err |
| 1355 | } |
| 1356 | res := msg.(*saslauthenticate.Response) |
| 1357 | if res.ErrorCode != 0 { |
| 1358 | err = makeError(res.ErrorCode, res.ErrorMessage) |
| 1359 | } |
| 1360 | return res.AuthBytes, err |
| 1361 | } |
| 1362 | |
| 1363 | var _ RoundTripper = (*Transport)(nil) |
no test coverage detected