Adding named DNS support for consideration - #12
Conversation
| package main | ||
|
|
||
| import "github.com/sourcegraph/checkup/cmd" | ||
| import "github.com/gogosphere/checkup/cmd" |
There was a problem hiding this comment.
These imports should be changed back 😉
|
Thanks @gogosphere! Left some comments inline. Liking how many tests there are. |
… stupidity, reviewed err check positioning
| if timeout == 0 { | ||
| timeout = 1 * time.Second | ||
| } | ||
| _ = timeout |
There was a problem hiding this comment.
Metalinter coughed on it, I didn’t mean to leave it there, let me resolve.
On Aug 19, 2016, at 1:26 PM, Matt Holt notifications@github.com wrote:
In dnschecker.go #12 (comment):
- result := Result{Title: c.EndpointName, Endpoint: c.EndpointURL, Timestamp: Timestamp()}
- result.Times = c.doChecks()
- return c.conclude(result), nil
+}
+// doChecks executes and returns each attempt.
+func (c DNSChecker) doChecks() Attempts {
- var err error
- var conn net.Conn
- timeout := c.Timeout
- if timeout == 0 {
timeout = 1 \* time.Second- }
- _ = timeout
What's this?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/sourcegraph/checkup/pull/12/files/3675fd806e5e2eadcecbe88e643ca87b20b70336#r75529770, or mute the thread https://github.com/notifications/unsubscribe-auth/AT4YpXQ2sj7uhBSzqS4Tr5IZT6La-jkbks5qhfVdgaJpZM4Jij2O.
|
Cool, thanks! We need to update the docs -- would you have a chance to edit the readme perchance? |
I put the .json config in the top of the dnschecker.go file. I pulled in "github.com/miekg/dns" since a new named server dns client seems like no fun. If you include a DNSTarget it will query the DNSServer for that and measure the responses. If you don't care about actually performing a lookup just seeing if there is connectivity you can exclude DNSTarget and it'll just fall back to a tcpDial check. I hope you find some value in it, I'll just keep it in my private repo if it doesn't meet up with your master plans. The format is a flat out lift from who ever checked in the tcpchecker last night. =)
Thanks for your consideration.
Also, if you need me to fix something or somethings suck I'm very happy to resolve whatever.