6 Commits

Author SHA1 Message Date
Brian Waldon
73504dca41 proxy: determine scheme based on TLSClientConfig 2014-09-23 11:01:58 -07:00
Brian Waldon
1ea3197feb proxy: pass addrs and scheme into newDirector 2014-09-23 11:01:55 -07:00
Brian Waldon
b94d0281d4 etcd: use TLS in proxy transport 2014-09-23 10:19:01 -07:00
Brian Waldon
fd1f46313a proxy: add readonly handler 2014-09-18 15:05:30 -07:00
Brian Waldon
a155f0bda6 proxy: rewrite stdlib ReverseProxy
The ReverseProxy code from the standard library doesn't actually
give us the control that we want. Pull it down and rip out what
we don't need, adding tests in the process.

All available endpoints are attempted when proxying a request. If a
proxied request fails, the upstream will be considered unavailable
for 5s and no more requests will be proxied to it. After the 5s is
up, the endpoint will be put back to rotation.
2014-09-12 22:56:23 -07:00
Brian Waldon
e5a482266f proxy: introduce director
The director class drives an httputil.ReverseProxy. This is used when
etcd is deployed in proxy mode.
2014-09-10 18:04:03 -07:00