sasl_authenticate_request.go 647 B

1234567891011121314151617181920212223242526272829
  1. package sarama
  2. type SaslAuthenticateRequest struct {
  3. SaslAuthBytes []byte
  4. }
  5. // APIKeySASLAuth is the API key for the SaslAuthenticate Kafka API
  6. const APIKeySASLAuth = 36
  7. func (r *SaslAuthenticateRequest) encode(pe packetEncoder) error {
  8. return pe.putBytes(r.SaslAuthBytes)
  9. }
  10. func (r *SaslAuthenticateRequest) decode(pd packetDecoder, version int16) (err error) {
  11. r.SaslAuthBytes, err = pd.getBytes()
  12. return err
  13. }
  14. func (r *SaslAuthenticateRequest) key() int16 {
  15. return APIKeySASLAuth
  16. }
  17. func (r *SaslAuthenticateRequest) version() int16 {
  18. return 0
  19. }
  20. func (r *SaslAuthenticateRequest) requiredVersion() KafkaVersion {
  21. return V1_0_0_0
  22. }