Commit graph

5 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
Miek Gieben
3ec0d9fe6b First commit 2016-03-18 20:57:35 +00:00