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
48 lines
830 B
Go
48 lines
830 B
Go
package sarama
|
|
|
|
type HeartbeatRequest struct {
|
|
GroupId string
|
|
GenerationId int32
|
|
MemberId string
|
|
}
|
|
|
|
func (r *HeartbeatRequest) encode(pe packetEncoder) error {
|
|
if err := pe.putString(r.GroupId); err != nil {
|
|
return err
|
|
}
|
|
|
|
pe.putInt32(r.GenerationId)
|
|
|
|
if err := pe.putString(r.MemberId); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (r *HeartbeatRequest) decode(pd packetDecoder, version int16) (err error) {
|
|
if r.GroupId, err = pd.getString(); err != nil {
|
|
return
|
|
}
|
|
if r.GenerationId, err = pd.getInt32(); err != nil {
|
|
return
|
|
}
|
|
if r.MemberId, err = pd.getString(); err != nil {
|
|
return
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (r *HeartbeatRequest) key() int16 {
|
|
return 12
|
|
}
|
|
|
|
func (r *HeartbeatRequest) version() int16 {
|
|
return 0
|
|
}
|
|
|
|
func (r *HeartbeatRequest) requiredVersion() KafkaVersion {
|
|
return V0_9_0_0
|
|
}
|