-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feature: added new api function ngx.resolve which allows perform host… #1478
base: master
Are you sure you want to change the base?
Conversation
… name's resolution from Lua code using Nginx core's dynamic resolver.
static void ngx_http_lua_resolve_empty_handler(ngx_resolver_ctx_t *ctx); | ||
static ngx_int_t ngx_http_lua_resolve_resume(ngx_http_request_t *r); | ||
static int ngx_http_lua_resolve_retval(ngx_http_lua_resolver_ctx_t *ctx, | ||
lua_State *L); |
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.
Bad indentation. See the guide for details:
https://openresty.org/en/c-coding-style-guide.html
Also, make sure you run the ngx-releng
tool mentioned in the guide as well. That tool should catch this.
This pull request is now in conflict :( |
f924579
to
fef2581
Compare
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
… name's resolution from Lua code using Nginx core's dynamic resolver.
Please, check my new FFI-based implementation. Lua-part (openresty/lua-resty-core#235)
Let me propose a new API function for Lua - ngx.resolve. This function relies on Nginx core's dynamic resolver. This approach has several advantages e.g: common query cache for Nginx core & Lua code with ability to customize caching policy by DNS TTL/custom timeout.
I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.