Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame] | 1 | package sarama |
| 2 | |
| 3 | type DescribeAclsRequest struct { |
| 4 | Version int |
| 5 | AclFilter |
| 6 | } |
| 7 | |
| 8 | func (d *DescribeAclsRequest) encode(pe packetEncoder) error { |
| 9 | d.AclFilter.Version = d.Version |
| 10 | return d.AclFilter.encode(pe) |
| 11 | } |
| 12 | |
| 13 | func (d *DescribeAclsRequest) decode(pd packetDecoder, version int16) (err error) { |
| 14 | d.Version = int(version) |
| 15 | d.AclFilter.Version = int(version) |
| 16 | return d.AclFilter.decode(pd, version) |
| 17 | } |
| 18 | |
| 19 | func (d *DescribeAclsRequest) key() int16 { |
| 20 | return 29 |
| 21 | } |
| 22 | |
| 23 | func (d *DescribeAclsRequest) version() int16 { |
| 24 | return int16(d.Version) |
| 25 | } |
| 26 | |
| 27 | func (d *DescribeAclsRequest) requiredVersion() KafkaVersion { |
| 28 | switch d.Version { |
| 29 | case 1: |
| 30 | return V2_0_0_0 |
| 31 | default: |
| 32 | return V0_11_0_0 |
| 33 | } |
| 34 | } |