mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-06 16:18:00 +08:00

- The metrics aren't fleshed out. In fact, there's only two so far: 1. uptime 2. number of queries - Even though the metrics aren't complete, I'm checking it in because this commit is already much too big. - I moved the version information to `version.status.sslip.io`; previously it was at `version.sslip.io`. I didn't want one endpoint for both metrics & version (worry: DNS amplification), and I wanted a consistent subdomain to find that information (i.e. `status.sslip.io`). - I'm not worried about atomic updates to the metrics; if a metric is off by one, if I skip a count because two lookups are happening at the exact same time, I don't care. - The `Metrics` struct is a pointer within `Xip` because I might have several copies of `Xip` (if I'm binding to several interfaces individually), but I must only have one copy of `Metrics` - I only include the metrics I'm interested in, usually because it took some work to implement that feature. I don't care about MX records, but I care about IPv6 lookups, DNS-01 challenges, public IP lookups. - got rid of a section of unreachable code at the end of `ProcessQuestion()`; I was tired of Goland flagging it. I had it there mostly because I was paranoid of falling through a `switch` statement