saslhandshake.go 472 B

1234567891011121314151617181920
  1. package saslhandshake
  2. import "github.com/segmentio/kafka-go/protocol"
  3. func init() {
  4. protocol.Register(&Request{}, &Response{})
  5. }
  6. type Request struct {
  7. Mechanism string `kafka:"min=v0,max=v1"`
  8. }
  9. func (r *Request) ApiKey() protocol.ApiKey { return protocol.SaslHandshake }
  10. type Response struct {
  11. ErrorCode int16 `kafka:"min=v0,max=v1"`
  12. Mechanisms []string `kafka:"min=v0,max=v1"`
  13. }
  14. func (r *Response) ApiKey() protocol.ApiKey { return protocol.SaslHandshake }