@@ -22,19 +22,28 @@ func (r *Request) Broker(cluster protocol.Cluster) (protocol.Broker, error) {
22
22
}
23
23
24
24
type Entry struct {
25
+ // We need at least one tagged field to indicate that this is a "flexible" message
26
+ // type.
27
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
25
28
Entities []Entity `kafka:"min=v0,max=v1"`
26
29
Ops []Ops `kafka:"min=v0,max=v1"`
27
30
}
28
31
29
32
type Entity struct {
30
- EntityType string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
31
- EntityName string `kafka:"min=v0,max=v0,nullable|min=v1,max=v1,nullable,compact"`
33
+ // We need at least one tagged field to indicate that this is a "flexible" message
34
+ // type.
35
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
36
+ EntityType string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
37
+ EntityName string `kafka:"min=v0,max=v0,nullable|min=v1,max=v1,nullable,compact"`
32
38
}
33
39
34
40
type Ops struct {
35
- Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
36
- Value float64 `kafka:"min=v0,max=v1"`
37
- Remove bool `kafka:"min=v0,max=v1"`
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"`
44
+ Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
45
+ Value float64 `kafka:"min=v0,max=v1"`
46
+ Remove bool `kafka:"min=v0,max=v1"`
38
47
}
39
48
40
49
type Response struct {
@@ -48,6 +57,9 @@ type Response struct {
48
57
func (r * Response ) ApiKey () protocol.ApiKey { return protocol .AlterClientQuotas }
49
58
50
59
type ResponseQuotas struct {
60
+ // We need at least one tagged field to indicate that this is a "flexible" message
61
+ // type.
62
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
51
63
ErrorCode int16 `kafka:"min=v0,max=v1"`
52
64
ErrorMessage string `kafka:"min=v0,max=v1,nullable"`
53
65
Entities []Entity `kafka:"min=v0,max=v1"`
0 commit comments