Skip to content

Commit 80b8082

Browse files
committed
add compact annotations for v1 protocol
1 parent 032aac5 commit 80b8082

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

protocol/alterclientquotas/alterclientquotas.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ type Entry struct {
2727
}
2828

2929
type Entity struct {
30-
EntityType string `kafka:"min=v0,max=v1"`
31-
EntityName string `kafka:"min=v0,max=v1,nullable"`
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"`
3232
}
3333

3434
type Ops struct {
35-
Key string `kafka:"min=v0,max=v1"`
35+
Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
3636
Value float64 `kafka:"min=v0,max=v1"`
3737
Remove bool `kafka:"min=v0,max=v1"`
3838
}

protocol/describeclientquotas/describeclientquotas.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ type Response struct {
3232
_ struct{} `kafka:"min=v1,max=v1,tag"`
3333
ThrottleTimeMs int32 `kafka:"min=v0,max=v1"`
3434
ErrorCode int16 `kafka:"min=v0,max=v1"`
35-
ErrorMessage string `kafka:"min=v0,max=v1,nullable"`
35+
ErrorMessage string `kafka:"min=v0,max=v0,nullable|min=v1,max=v1,nullable,compact"`
3636
Entries []ResponseQuotas `kafka:"min=v0,max=v1"`
3737
}
3838

3939
func (r *Response) ApiKey() protocol.ApiKey { return protocol.DescribeClientQuotas }
4040

4141
type Entity struct {
42-
EntityType string `kafka:"min=v0,max=v1"`
43-
EntityName string `kafka:"min=v0,max=v1,nullable"`
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"`
4444
}
4545

4646
type Value struct {
47-
Key string `kafka:"min=v0,max=v1"`
47+
Key string `kafka:"min=v0,max=v0|min=v1,max=v1,compact"`
4848
Value float64 `kafka:"min=v0,max=v1"`
4949
}
5050

0 commit comments

Comments
 (0)