Skip to content

Adding named DNS support for consideration - #12

Merged
mholt merged 19 commits into
sourcegraph:masterfrom
gogosphere:master
Aug 19, 2016
Merged

Adding named DNS support for consideration#12
mholt merged 19 commits into
sourcegraph:masterfrom
gogosphere:master

Conversation

@gogosphere

@gogosphere gogosphere commented Aug 11, 2016

Copy link
Copy Markdown
Contributor

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.

Comment thread cmd/checkup/main.go Outdated
package main

import "github.com/sourcegraph/checkup/cmd"
import "github.com/gogosphere/checkup/cmd"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports should be changed back 😉

@mholt

mholt commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

Thanks @gogosphere! Left some comments inline. Liking how many tests there are.

Comment thread dnschecker.go Outdated
if timeout == 0 {
timeout = 1 * time.Second
}
_ = timeout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mholt

mholt commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

Cool, thanks! We need to update the docs -- would you have a chance to edit the readme perchance?

@mholt
mholt merged commit 102711e into sourcegraph:master Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants