proxy-wasm-rust-sdk
proxy-wasm-rust-sdk copied to clipboard
In-Code Documentation
In-Code Documentation for the following functions:
-
dispatch_http_call()
-
on_http_call_response()
-
on_vm_start()
-
get_vm_configuration()
-
on_configure()
-
get_plugin_configuration()
-
set_tick_period()
-
on_tick()
-
on_http_request_headers()
-
get_http_request_headers()
-
get_http_request_header()
-
add_http_request_header()
-
resume_http_context()
-
send_http_response()
Inspired by https://github.com/proxy-wasm/spec/pull/42
Why?
To have documentation in your editor:
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
All examples do not include the RootContext
implementation or main!
Macro, as they are pretty similar in every case. So copy and pasting the examples, won't work, but I can still add them, if you think it's better.
@PiotrSikora What do you think? Sorry to ping you, but I think this would be a great benefit for DX
@PiotrSikora What do you think? Sorry to ping you, but I think this would be a great benefit for DX
I agree those would be very helpful. Sorry for the delay, I'll review this in the coming days.
@PiotrSikora I tested all documented functions again and set up a repo with 7 folders that cover all functions. It might still be that something is missing. I will do some diffs on the docs and the testing-repo-files to see if anything is missing apart from the boilerplate stuff (proxy_wasm::main!
, RootContext Impl, etc.).
I hope this makes the review as easy as possible.
I can squash my changes into one commit, if required.
@PiotrSikora I can also add the examples from the mentioned repo to the examples/
directory...
@PiotrSikora I can also add the examples from the mentioned repo to the
examples/
directory...
I took a look at them, and they seem to be mostly duplicates of the existing examples.