mirror of
https://github.com/fhmq/hmq.git
synced 2026-09-01 15:24:53 +00:00
* modify * update * add acl * add feature * update dockerfile * add deploy * update * update * plugins * plugins * update * update * update * fixed * remove * fixed * add log * update * fixed * update * fix config * add http api * add http api * resp * add config for work chan * update * fixed * update * disable trace * fixed * change acl * fixed * fixed res * dd * dd * ddd * dd * update * fixed * update * add * fixed * update key * add log * update * format * update * update auth * update * update readme * added * update * fixed * fixed * fix * upade * update * update
33 lines
536 B
Go
33 lines
536 B
Go
package sarama
|
|
|
|
type HeartbeatResponse struct {
|
|
Err KError
|
|
}
|
|
|
|
func (r *HeartbeatResponse) encode(pe packetEncoder) error {
|
|
pe.putInt16(int16(r.Err))
|
|
return nil
|
|
}
|
|
|
|
func (r *HeartbeatResponse) decode(pd packetDecoder, version int16) error {
|
|
kerr, err := pd.getInt16()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
r.Err = KError(kerr)
|
|
|
|
return nil
|
|
}
|
|
|
|
func (r *HeartbeatResponse) key() int16 {
|
|
return 12
|
|
}
|
|
|
|
func (r *HeartbeatResponse) version() int16 {
|
|
return 0
|
|
}
|
|
|
|
func (r *HeartbeatResponse) requiredVersion() KafkaVersion {
|
|
return V0_9_0_0
|
|
}
|