| 1 |
package heartbeat |
| 2 |
|
| 3 |
import "github.com/segmentio/kafka-go/protocol" |
| 4 |
|
| 5 |
func init() { |
| 6 |
protocol.Register(&Request{}, &Response{}) |
| 7 |
} |
| 8 |
|
| 9 |
|
| 10 |
type Request struct { |
| 11 |
|
| 12 |
|
| 13 |
_ struct{} `kafka:"min=v4,max=v4,tag"` |
| 14 |
|
| 15 |
GroupID string `kafka:"min=v0,max=v4"` |
| 16 |
GenerationID int32 `kafka:"min=v0,max=v4"` |
| 17 |
MemberID string `kafka:"min=v0,max=v4"` |
| 18 |
GroupInstanceID string `kafka:"min=v3,max=v4,nullable"` |
| 19 |
} |
| 20 |
|
| 21 |
func (r *Request) ApiKey() protocol.ApiKey { |
| 22 |
return protocol.Heartbeat |
| 23 |
} |
| 24 |
|
| 25 |
type Response struct { |
| 26 |
|
| 27 |
|
| 28 |
_ struct{} `kafka:"min=v4,max=v4,tag"` |
| 29 |
|
| 30 |
ErrorCode int16 `kafka:"min=v0,max=v4"` |
| 31 |
ThrottleTimeMs int32 `kafka:"min=v1,max=v4"` |
| 32 |
} |
| 33 |
|
| 34 |
func (r *Response) ApiKey() protocol.ApiKey { |
| 35 |
return protocol.Heartbeat |
| 36 |
} |