package proxy
import "github.com/coreos/etcd/proxy"
Index ¶
- func NewHandler(t *http.Transport, urlsFunc GetProxyURLs) http.Handler
- func NewReadonlyHandler(hdlr http.Handler) http.Handler
- type GetProxyURLs
Functions ¶
func NewHandler ¶
func NewHandler(t *http.Transport, urlsFunc GetProxyURLs) http.Handler
NewHandler creates a new HTTP handler, listening on the given transport, which will proxy requests to an etcd cluster. The handler will periodically update its view of the cluster.
func NewReadonlyHandler ¶
NewReadonlyHandler wraps the given HTTP handler to allow only GET requests
Types ¶
type GetProxyURLs ¶
type GetProxyURLs func() []string
GetProxyURLs is a function which should return the current set of URLs to which client requests should be proxied. This function will be queried periodically by the proxy Handler to refresh the set of available backends.
Source Files ¶
director.go proxy.go reverse.go
- Version
- v2.0.0+incompatible
- Published
- Jan 28, 2015
- Platform
- darwin/amd64
- Imports
- 10 packages
- Last checked
- 4 minutes ago –
Tools for package owners.