Skip to content

Commit 13ba79e

Browse files
committed
doc strings
1 parent 21f84b0 commit 13ba79e

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

alterclientquotas.go

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,41 @@ type AlterClientQuotasRequest struct {
2323
}
2424

2525
type AlterClientQuotaEntry struct {
26+
// The quota entities to alter.
2627
Entities []AlterClientQuotaEntity
27-
Ops []AlterClientQuotaOps
28+
29+
// An individual quota configuration entry to alter.
30+
Ops []AlterClientQuotaOps
2831
}
2932

3033
type AlterClientQuotaEntity struct {
34+
// The quota entity type.
3135
EntityType string
36+
37+
// The name of the quota entity, or null if the default.
3238
EntityName string
3339
}
3440

3541
type AlterClientQuotaOps struct {
36-
Key string
37-
Value float64
42+
// The quota configuration key.
43+
Key string
44+
45+
// The quota configuration value to set, otherwise ignored if the value is to be removed.
46+
Value float64
47+
48+
// Whether the quota configuration value should be removed, otherwise set.
3849
Remove bool
3950
}
4051

4152
type AlterClientQuotaResponseQuotas struct {
42-
ErrorCode int16
53+
// The error code, or `0` if the quota alteration succeeded.
54+
ErrorCode int16
55+
56+
// The error message, or `nil` if the quota alteration succeeded.
4357
ErrorMessage string
44-
Entities []AlterClientQuotaEntity
58+
59+
// The altered quota entities
60+
Entities []AlterClientQuotaEntity
4561
}
4662

4763
// AlterClientQuotasResponse represents a response from a kafka broker to an alter client

alterclientquotas_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestClientAlterClientQuotas(t *testing.T) {
2323
client, shutdown := newLocalClient()
2424
defer shutdown()
2525

26-
resp, err := client.AlterClientQuotas(context.Background(), &AlterClientQuotasRequest{
26+
_, err := client.AlterClientQuotas(context.Background(), &AlterClientQuotasRequest{
2727
Entries: []AlterClientQuotaEntry{
2828
AlterClientQuotaEntry{
2929
Entities: []AlterClientQuotaEntity{

0 commit comments

Comments
 (0)