Commit graph

8 commits

Author SHA1 Message Date
Yong Tang
a1b175ef78 Move Healthcheck to middleware/pkg/healthcheck (#854)
* Move healthcheck out

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Move healthcheck to middleware/pkg/healthcheck

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-08-09 09:21:33 -07:00
ghostflame
bb05a665eb middleware/proxy: async health checks (#749)
* Switches out Unhealthy bool for OkUntil timestamp

* Make sure servers are healthy forever if there are no health checks

* Moves health check off into a go routine to avoid blocking conditions

* Improved logging info

* Fixes initial date

* Fixes health checking; alters tests to adapt to async health checking

* Moves future variable into static upstream and populates it in more places

* Restores silencing of stdout during testing

* Restores silencing of stdout during testing

* keeps check url string once built

* Removes debug message

* uses zero value to signal no checking; reduces in-mutex code to a fetch
2017-06-30 02:13:45 -07:00
Miek Gieben
003b1bf678 Fix health race (#645)
* Revert "middleware/proxy: Make Unhealthy a pointer (#615)"

This reverts commit acbf522ceb.

* middleware/proxy: add proper locking

This add the proper locking around `Unhealthy`.
2017-04-24 20:37:43 +01:00
Miek Gieben
acbf522ceb middleware/proxy: Make Unhealthy a pointer (#615)
Pointer updates are atomic so drop the sync.RWMutex as it is not needed
anymore. This also fixes the race introduced with dfc71df (although I
believe this is the first time we properly tested that code path).
2017-04-13 16:26:05 +01:00
Yong Tang
81af74aad0 Fix import path github.com/miekg/coredns -> github.com/coredns/coredns (#547)
This fix fixes import path from
`github.com/miekg/coredns`
->
`github.com/coredns/coredns`
2017-02-22 06:51:47 +00:00
Miek Gieben
a5f3cb5fe5 La context (#521)
* middleware/proxy: give Exchange a context

Make context.Context the first paramater in the Exchange method.
This is inline with all other query functions.

* up the version
2017-02-11 16:56:04 +00:00
Miek Gieben
89dc5720d0 And make it actually work (#508) 2017-02-07 21:03:17 +00:00
Miek Gieben
123a76c91e middleware/proxy: absorb httpproxy (#481)
* middleware/proxy: absorb httpproxy

Move the httproxy into proxy. This adds and Exchanger interface which
is used to exchange the messages with the upstream.

The https_google upstream will re-resolve itself and update the upstream
hosts used every 300s.

* Remove and add TODO
2017-02-06 19:32:48 +00:00