Use of miekg/dns

82 views
Skip to first unread message

cbro...@gmail.com

unread,
Nov 27, 2017, 10:18:38 PM11/27/17
to Cloudprober
I was looking through the code for the dns prober, and I noticed it uses https://github.com/miekg/dns instead of Go's built-in resolver. Based on my cursory review, it doesn't appear that the prober logic depends on any functionality that the built-in resolver doesn't already provide, so I'm curious why the 3rd party version is being utilized? This is just for my own understanding.

Thanks,
-Chris

Manu Garg

unread,
Nov 28, 2017, 5:09:28 AM11/28/17
to cbro...@gmail.com, Cloudprober
Hi Chris,


On Mon, Nov 27, 2017 at 7:07 PM, <cbro...@gmail.com> wrote:
I was looking through the code for the dns prober, and I noticed it uses https://github.com/miekg/dns instead of Go's built-in resolver. Based on my cursory review, it doesn't appear that the prober logic depends on any functionality that the built-in resolver doesn't already provide, so I'm curious why the 3rd party version is being utilized? This is just for my own understanding.

Go's standard resolver functions[1] don't allow you to specify a particular DNS server, which is a required functionality for the "dns" probe as it sends DNS requests to the configured DNS server target. https://github.com/miekg/dns seems to be most popular way to work with DNS.


Thanks,
-Chris

--
You received this message because you are subscribed to the Google Groups "Cloudprober" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudprober+unsubscribe@googlegroups.com.
To post to this group, send email to cloud...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudprober/f430fc31-a4dd-4007-b790-13db496cdb42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Manu Garg
Creator of Page Notes & Pacparser
"Journey is the destination of life."

Chris Broglie

unread,
Nov 28, 2017, 1:33:16 PM11/28/17
to Cloudprober
Oh alright, that makes sense. I misunderstood the job of the dns prober; I thought it was to test the resolution of a given domain, as opposed to test a given dns server. Thanks for the explanation.


On Tuesday, November 28, 2017 at 2:09:28 AM UTC-8, Manu Garg wrote:
Hi Chris,


On Mon, Nov 27, 2017 at 7:07 PM, <cbro...@gmail.com> wrote:
I was looking through the code for the dns prober, and I noticed it uses https://github.com/miekg/dns instead of Go's built-in resolver. Based on my cursory review, it doesn't appear that the prober logic depends on any functionality that the built-in resolver doesn't already provide, so I'm curious why the 3rd party version is being utilized? This is just for my own understanding.

Go's standard resolver functions[1] don't allow you to specify a particular DNS server, which is a required functionality for the "dns" probe as it sends DNS requests to the configured DNS server target. https://github.com/miekg/dns seems to be most popular way to work with DNS.


Thanks,
-Chris

--
You received this message because you are subscribed to the Google Groups "Cloudprober" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudprober...@googlegroups.com.

To post to this group, send email to cloud...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudprober/f430fc31-a4dd-4007-b790-13db496cdb42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages