-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
lua: add request info dynamic metadata api #3627
Conversation
This patch add access to request info's dynamic metadata from lua. Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
@dio is this still WIP or does this need a reviewer? |
@mattklein123 yes it is still WIP I will add docs, support for accepting a table as param then I'll ask for a review. Two questions,
Thanks! |
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
} | ||
|
||
int RequestInfoWrapper::luaProtocol(lua_State* state) { | ||
switch (request_info_.protocol().value()) { |
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.
I have not looked at the entire code. But one quick comment here, this whole switch
can be replaced with this method call
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.
Gotcha! Thanks @ramaraochavali!
@dio what do you mean? Are you asking if I think this feature is no longer necessary? TBH I don't know I haven't been tracking all of this very closely. In general I would prefer there is only a single way to do something where reasonable, but if there are good reasons to have multiple ways am open to it. Thoughts? |
Sorry for introducing confusion. Will breakdown this PR into:
I’ll continue this hopefully tonight. Thanks |
I have put PRs related to #3704:
While this PR will be layered on top of #3760 if approved and merged. Thanks. |
Resubmitted as #3800 for adding dynamic metadata API |
lua: add request info dynamic metadata API
Description:
This patch allows to get and set the dynamic metadata of a request via Lua.
Setting metadata,
Getting metadata,
Risk Level: Low
Testing: Unit and integration tests
Docs Changes:
Release Notes:
Fixes #3618