-
Notifications
You must be signed in to change notification settings - Fork 127
refactor: move the runtime filter configuration out of extproc #1546
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Takeshi Yoneda <[email protected]>
|
|
||
| // LoadConfig updates the configuration of the external processor. | ||
| func (s *Server) LoadConfig(ctx context.Context, config *filterapi.Config) error { | ||
| backends := make(map[string]*processorConfigBackend, len(config.Backends)) |
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.
note: mainly this PR is moving this logic and the processorConfig* structs into filterapi/runtimefc package. Others are mechanical
Signed-off-by: Takeshi Yoneda <[email protected]>
|
|
||
| // Package runtimefc is the API for the construct of runtime filter configurations parsed from filterapi.Config. | ||
| // | ||
| // Decoupled from filterapi to avoid circular dependencies. |
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.
This is the reason why we cannot have this directly inside the filterapi package
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.
Looking at it, it doesn't feel quite right, then, does it?
I mean, we have an "api" package that depends on implementation-specific things like the backend-auth, because we need to call impl-specific constructors from this package...
Perhaps we need to split this differently?
Signed-off-by: Takeshi Yoneda <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1546 +/- ##
==========================================
+ Coverage 84.06% 84.07% +0.01%
==========================================
Files 149 150 +1
Lines 12874 12879 +5
==========================================
+ Hits 10822 10828 +6
+ Misses 1430 1428 -2
- Partials 622 623 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
PTAL @nacx |
Description
This commit decouples "runtime filter config" that is derived from the filterapi.Config to be able to reuse the code in dynamic modules port #90.
Related Issues/PRs (if applicable)
Preparation for #90