@@ -21,9 +21,12 @@ func (r *Request) Broker(cluster protocol.Cluster) (protocol.Broker, error) {
21
21
}
22
22
23
23
type Component struct {
24
- EntityType string `kafka:"min=v0,max=v1"`
25
- MatchType int8 `kafka:"min=v0,max=v1"`
26
- Match string `kafka:"min=v0,max=v1,nullable"`
24
+ // We need at least one tagged field to indicate that this is a "flexible" message
25
+ // type.
26
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
27
+ EntityType string `kafka:"min=v0,max=v1"`
28
+ MatchType int8 `kafka:"min=v0,max=v1"`
29
+ Match string `kafka:"min=v0,max=v1,nullable"`
27
30
}
28
31
29
32
type Response struct {
@@ -39,16 +42,25 @@ type Response struct {
39
42
func (r * Response ) ApiKey () protocol.ApiKey { return protocol .DescribeClientQuotas }
40
43
41
44
type Entity struct {
42
- EntityType string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
43
- EntityName string `kafka:"min=v0,max=v0,nullable|min=v1,max=v1,nullable,compact"`
45
+ // We need at least one tagged field to indicate that this is a "flexible" message
46
+ // type.
47
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
48
+ EntityType string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
49
+ EntityName string `kafka:"min=v0,max=v0,nullable|min=v1,max=v1,nullable,compact"`
44
50
}
45
51
46
52
type Value struct {
47
- Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
48
- Value float64 `kafka:"min=v0,max=v1"`
53
+ // We need at least one tagged field to indicate that this is a "flexible" message
54
+ // type.
55
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
56
+ Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
57
+ Value float64 `kafka:"min=v0,max=v1"`
49
58
}
50
59
51
60
type ResponseQuotas struct {
61
+ // We need at least one tagged field to indicate that this is a "flexible" message
62
+ // type.
63
+ _ struct {} `kafka:"min=v1,max=v1,tag"`
52
64
Entities []Entity `kafka:"min=v0,max=v1"`
53
65
Values []Value `kafka:"min=v0,max=v1"`
54
66
}
0 commit comments