Open PiotrSikora opened 4 years ago
Seems a slam dunk interface improvement.
Huge +1 from me. I think this is one of the things that I initially commented on.
+1 as a user. Using the same callback is really problematic when one plugin serves in different roles (which might be common to save on resources by reusing the VM/module).
I think this will need pausable access log extensions in envoy.
The current version of the ABI defines generic
proxy_on_context_create()
andproxy_on_context_finalize()
functions which are used for VM and plugin lifecycle, as well as for per-stream lifecycle, which makes"context"
a bit overloaded and confusing.For VM context:
For plugin context:
For HTTP per-stream context:
Instead, we could have specialized "finalize" functions for each context type, and create context implicitly as part of each "start" function:
For VM context:
For plugin context:
For HTTP per-stream context:
In case
proxy_on_http_finalize()
returnsAction::Pause
, the host would wait untilproxy_resume()
is called before callingproxy_on_http_finalize()
again (which matches the behavior of other callbacks that have the ability to pause/resume processing).@mattklein123 @htuch @yskopets @yuval-k @gbrail @jplevyak @kyessenov any thoughts?