github.com/segmentio/kafka-go@v0.4.48-0.20240318174348-3f6244eb34fd/protocol/saslhandshake/saslhandshake.go (about) 1 package saslhandshake 2 3 import "github.com/segmentio/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 }