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