Our current filter's constructors and pipelines are messy. They accept a lot of parameters, have a lot of parameters defaulted and it's hard to what do they mean. It is also hard to recognize how our pipelines are created.
I would like to propose a standardization:
Each component would expose an API:
Zero-parameter constructor to initialize default component (it should have best parameters that we know)
Constructor that accept SerenityConfig. Parameter default values would be overwritten by those in SerenityConfig. It should be used to expose configuration to operators in the future.
Set of "setters" to expose what parameters can be changed "in code"
If filter is designed to use dependency injection (like QoS Controller or Smoothing filter), it should accept DI object in both constructors (but no configuration for it)
For pipeline, we should move from 'constructor initialization list' to constructor body and create a pipeline in logical "phases" to make it easier to read and understand.
Our current filter's constructors and pipelines are messy. They accept a lot of parameters, have a lot of parameters defaulted and it's hard to what do they mean. It is also hard to recognize how our pipelines are created. I would like to propose a standardization:
Each component would expose an API:
For pipeline, we should move from 'constructor initialization list' to constructor body and create a pipeline in logical "phases" to make it easier to read and understand.