Skip to content

Commit 259b170

Browse files
committed
Revert "add more tagged fields"
This reverts commit 5b5b590.
1 parent 5b5b590 commit 259b170

File tree

2 files changed

+12
-36
lines changed

2 files changed

+12
-36
lines changed

protocol/alterclientquotas/alterclientquotas.go

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,19 @@ func (r *Request) Broker(cluster protocol.Cluster) (protocol.Broker, error) {
2222
}
2323

2424
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"`
2825
Entities []Entity `kafka:"min=v0,max=v1"`
2926
Ops []Ops `kafka:"min=v0,max=v1"`
3027
}
3128

3229
type Entity struct {
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"`
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"`
3832
}
3933

4034
type Ops 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"`
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"`
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"`
4738
}
4839

4940
type Response struct {
@@ -57,9 +48,6 @@ type Response struct {
5748
func (r *Response) ApiKey() protocol.ApiKey { return protocol.AlterClientQuotas }
5849

5950
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"`
6351
ErrorCode int16 `kafka:"min=v0,max=v1"`
6452
ErrorMessage string `kafka:"min=v0,max=v1,nullable"`
6553
Entities []Entity `kafka:"min=v0,max=v1"`

protocol/describeclientquotas/describeclientquotas.go

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ func (r *Request) Broker(cluster protocol.Cluster) (protocol.Broker, error) {
2121
}
2222

2323
type Component struct {
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"`
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"`
3027
}
3128

3229
type Response struct {
@@ -42,25 +39,16 @@ type Response struct {
4239
func (r *Response) ApiKey() protocol.ApiKey { return protocol.DescribeClientQuotas }
4340

4441
type Entity struct {
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"`
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"`
5044
}
5145

5246
type Value struct {
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"`
47+
Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
48+
Value float64 `kafka:"min=v0,max=v1"`
5849
}
5950

6051
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"`
6452
Entities []Entity `kafka:"min=v0,max=v1"`
6553
Values []Value `kafka:"min=v0,max=v1"`
6654
}

0 commit comments

Comments
 (0)