1 Star 0 Fork 0

tym_hmm/go-kafa-Shopify-sarama

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sasl_authenticate_request.go 899 Bytes
一键复制 编辑 原始数据 按行查看 历史
天蝎儿 提交于 2023-01-06 17:03 +08:00 . build on 1.137.2
package sarama
type SaslAuthenticateRequest struct {
// Version defines the protocol version to use for encode and decode
Version int16
SaslAuthBytes []byte
}
// APIKeySASLAuth is the API key for the SaslAuthenticate Kafka API
const APIKeySASLAuth = 36
func (r *SaslAuthenticateRequest) encode(pe packetEncoder) error {
return pe.putBytes(r.SaslAuthBytes)
}
func (r *SaslAuthenticateRequest) decode(pd packetDecoder, version int16) (err error) {
r.Version = version
r.SaslAuthBytes, err = pd.getBytes()
return err
}
func (r *SaslAuthenticateRequest) key() int16 {
return APIKeySASLAuth
}
func (r *SaslAuthenticateRequest) version() int16 {
return r.Version
}
func (r *SaslAuthenticateRequest) headerVersion() int16 {
return 1
}
func (r *SaslAuthenticateRequest) requiredVersion() KafkaVersion {
switch r.Version {
case 1:
return V2_2_0_0
default:
return V1_0_0_0
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tym_hmm/go-kafa-shopify-sarama.git
git@gitee.com:tym_hmm/go-kafa-shopify-sarama.git
tym_hmm
go-kafa-shopify-sarama
go-kafa-Shopify-sarama
v1.37.2

搜索帮助