-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support describeacls #1166
Support describeacls #1166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this file to match the file name convention of the corresponding source code file https://github.com/segmentio/kafka-go/blob/main/createacls.go
@@ -15,15 +15,18 @@ func TestClientCreateACLs(t *testing.T) { | |||
client, shutdown := newLocalClient() | |||
defer shutdown() | |||
|
|||
res, err := client.CreateACLs(context.Background(), &CreateACLsRequest{ | |||
topic := makeTopic() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made these non-deterministic to avoid collisions with other tests
type ACLFilter struct { | ||
ResourceTypeFilter ResourceType | ||
ResourceNameFilter string | ||
ResourcePatternTypeFilter PatternType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure how to handle this field since it was added in v1. We could use a pointer to make this nullable or have separate data structures and code paths for different versions. WDYT @rhansen2 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this works as is but we should probably have a comment explaining that it won't be used if the only supported API version is v0. I think the encoding will leave it out as appropriate based on the api version being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I added a comment
Support describeacls API
API Docs
I based this PR on similar work done here #1119
Additionally I fixed the tags for createacls protocol as I noticed those did not match the API docs