Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame^] | 1 | package sarama |
| 2 | |
| 3 | type DescribeGroupsRequest struct { |
| 4 | Groups []string |
| 5 | } |
| 6 | |
| 7 | func (r *DescribeGroupsRequest) encode(pe packetEncoder) error { |
| 8 | return pe.putStringArray(r.Groups) |
| 9 | } |
| 10 | |
| 11 | func (r *DescribeGroupsRequest) decode(pd packetDecoder, version int16) (err error) { |
| 12 | r.Groups, err = pd.getStringArray() |
| 13 | return |
| 14 | } |
| 15 | |
| 16 | func (r *DescribeGroupsRequest) key() int16 { |
| 17 | return 15 |
| 18 | } |
| 19 | |
| 20 | func (r *DescribeGroupsRequest) version() int16 { |
| 21 | return 0 |
| 22 | } |
| 23 | |
| 24 | func (r *DescribeGroupsRequest) requiredVersion() KafkaVersion { |
| 25 | return V0_9_0_0 |
| 26 | } |
| 27 | |
| 28 | func (r *DescribeGroupsRequest) AddGroup(group string) { |
| 29 | r.Groups = append(r.Groups, group) |
| 30 | } |