-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(plugin): add proxywasm
plugin
#284
base: beta
Are you sure you want to change the base?
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.
This is a first draft for the proxywasm
plugin.
This plugin will allow a great extensibility and usage within the reverse proxy world.
More examples are to come with Nginx and Istio.
What's left to do:
- Add nginx and istio examples
- Add E2E tests
- Publish a WASM Docker Image that will be used with Istio (ci)
- Enhance documentation
- All examples should have a README on how to run them with a full execution example.
2b6fcdf
to
4aa69e6
Compare
4aa69e6
to
410a49b
Compare
410a49b
to
beca491
Compare
There's one remaining issue before marking this PR as ready: It's the way the The signature of the function is the following: // DispatchHttpCall is for dispatching HTTP calls to a remote cluster. This can be used by all contexts
// including Tcp and Root contexts. "cluster" arg specifies the remote cluster the host will send
// the request against with "headers", "body", and "trailers" arguments. "callBack" function is called if the host successfully
// made the request and received the response from the remote cluster.
// When the callBack function is called, the "GetHttpCallResponseHeaders", "GetHttpCallResponseBody", "GetHttpCallResponseTrailers"
// calls are available for accessing the response information.
func DispatchHttpCall(
cluster string,
headers [][2]string,
body []byte,
trailers [][2]string,
timeoutMillisecond uint32,
callBack func(numHeaders, bodySize, numTrailers int),
) (calloutID uint32, err error) { Istio expects the following arguments:
Other reverse proxies (Ngin and APISIX) expect the following arguments:
Kong ref: https://github.com/Kong/ngx_wasm_module/blob/b19d405403ca6765c548e571010aea3af1accaea/src/http/proxy_wasm/ngx_http_proxy_wasm_dispatch.c#L255-L269 So depending of the execution context, I have to provide different ways of build the configuration. But I'm not really sure. |
The `proxywasm` plugin is a WASM Filter following the ProxyWasm ABI Specification using the proxywasm go sdk This allows extensibility with any reverse proxy who implements the ProxyWasm ABI Specification. The current WASM Filter was successfully tested with APISIX and Envoy.
106e187
to
ae56efa
Compare
Everything is almost ready:
|
The
proxywasm
plugin is a WASM Filter following the ProxyWasm ABI Specification using the proxywasm go sdkThis allows extensibility with any reverse proxy who implements the ProxyWasm ABI Specification.
The current WASM Filter was successfully tested with APISIX and Envoy.