File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,11 @@ func init() {
8
8
9
9
// Detailed API definition: https://kafka.apache.org/protocol#The_Messages_AlterClientQuotas
10
10
type Request struct {
11
- Entries []Entry `kafka:"min=v0,max=v1"`
12
- ValidateOnly bool `kafka:"min=v0,max=v1"`
11
+ // We need at least one tagged field to indicate that this is a "flexible" message
12
+ // type.
13
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
14
+ Entries []Entry `kafka:"min=v0,max=v1"`
15
+ ValidateOnly bool `kafka:"min=v0,max=v1"`
13
16
}
14
17
15
18
func (r * Request ) ApiKey () protocol.ApiKey { return protocol .AlterClientQuotas }
@@ -35,6 +38,9 @@ type Ops struct {
35
38
}
36
39
37
40
type Response struct {
41
+ // We need at least one tagged field to indicate that this is a "flexible" message
42
+ // type.
43
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
38
44
ThrottleTimeMs int32 `kafka:"min=v0,max=v1"`
39
45
Results []ResponseQuotas `kafka:"min=v0,max=v1"`
40
46
}
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ func init() {
7
7
}
8
8
9
9
type Request struct {
10
+ // We need at least one tagged field to indicate that this is a "flexible" message
11
+ // type.
12
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
10
13
Components []Component `kafka:"min=v0,max=v1"`
11
14
Strict bool `kafka:"min=v0,max=v1"`
12
15
}
@@ -24,6 +27,9 @@ type Component struct {
24
27
}
25
28
26
29
type Response struct {
30
+ // We need at least one tagged field to indicate that this is a "flexible" message
31
+ // type.
32
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
27
33
ThrottleTimeMs int32 `kafka:"min=v0,max=v1"`
28
34
ErrorCode int16 `kafka:"min=v0,max=v1"`
29
35
ErrorMessage string `kafka:"min=v0,max=v1,nullable"`
You can’t perform that action at this time.
0 commit comments