-
Notifications
You must be signed in to change notification settings - Fork 612
feat: configurable event filter #610
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
Conversation
Thanks for creating this PR 🙌 |
I've pushed a custom built nginx-proxy image for you to test: |
@outdooracorn any luck trying |
Ping @outdooracorn 👋 |
91ddfac
to
b6b6a26
Compare
b6b6a26
to
b4a831d
Compare
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.
Pull Request Overview
This PR enhances docker-gen by updating the Docker event handling to support network connect and disconnect events using the new Docker API event format. Key changes include:
- Updating test fixtures in generator_test.go to reflect the new event format.
- Refactoring the event filtering logic in generator.go to handle both container and network events.
- Updating the Docker API version information in the test fixture.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
internal/generator/generator_test.go | Updated test events and Docker version to match the new event format. |
internal/generator/generator.go | Refactored event handling to include network events using slices.Contains. |
Comments suppressed due to low confidence (1)
internal/generator/generator_test.go:29
- The test cases currently validate container event handling; consider adding separate tests to validate network connect and disconnect events to ensure full coverage of the new functionality.
{"Type":"container","Action":"start","Actor": {"ID":"8dfafdbc3a40"},"Time":1374067924}
2c5db1d
to
64d297a
Compare
064b242
to
654bbca
Compare
I decided to make this configurable via a new |
This PR make use of the new Docker API event format available on Docker API v1.22+ (the old event format is automatically translated to the new one by fsouza/go-dockerclient) and make docker-gen watch for network connect and disconnect events.
Close #190
Ping @outdooracorn