-
Notifications
You must be signed in to change notification settings - Fork 170
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
[nginx] define resolver directive in the config #508
Conversation
local insert = table.insert | ||
local concat = table.concat | ||
local re = require('ngx.re') | ||
|
||
local function parse_nameservers() |
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.
Shouldn't this method be exposed in resty.resolver?
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.
resty.resolver exposes the nameservers as tables with some metamethods. Those objects can be joined with table.join so they have to be serialized first into ip:port
. I guess it is worth a comment in the code. Will fix it.
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.
Fixed.
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.
That helps 👍
|
||
for _,nameserver in ipairs(resolver.init_nameservers()) do | ||
-- resty.resolver returns nameservers as tables with __tostring metamethod | ||
-- unfrotunately those objects can't be joined with table.concat |
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.
typo 👀
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.
⭕️
so cosockets use internal resolver and don't have to go through APIcast resolver. Closes #488
so cosockets use internal resolver and don't have to
go through APIcast resolver.
Closes #488