Documentation
¶
Index ¶
- Variables
- type HostRewriter
- type JsonHostRewriter
- func (j *JsonHostRewriter) CanHandle(res http.ResponseWriter) bool
- func (j *JsonHostRewriter) Decorate(handler httprouter.Handle) httprouter.Handle
- func (j *JsonHostRewriter) Rewrite(body []byte, reqUrl *url.URL) ([]byte, error)
- func (j *JsonHostRewriter) RewriteUrl(urlString string, reqUrl *url.URL) (string, error)
- type ProxyHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var RemoveElement = errors.New("Obsolete element")
View Source
var UnmappableUrl = errors.New("unmappable URL")
Functions ¶
This section is empty.
Types ¶
type HostRewriter ¶
type HostRewriter interface {
CanHandle(http.ResponseWriter) bool
Rewrite([]byte, *url.URL) ([]byte, error)
RewriteUrl(urlString string, reqUrl *url.URL) (string, error)
Decorate(httprouter.Handle) httprouter.Handle
}
func NewHostRewriter ¶
type JsonHostRewriter ¶
func (*JsonHostRewriter) CanHandle ¶
func (j *JsonHostRewriter) CanHandle(res http.ResponseWriter) bool
func (*JsonHostRewriter) Decorate ¶
func (j *JsonHostRewriter) Decorate(handler httprouter.Handle) httprouter.Handle
func (*JsonHostRewriter) RewriteUrl ¶
type ProxyHandler ¶
type ProxyHandler struct {
Client *http.Client
Logger *logging.Logger
Config *config.Configuration
// contains filtered or unexported fields
}
func NewProxyHandler ¶
func NewProxyHandler(logger *logging.Logger, config *config.Configuration, metrics *monitoring.PromMetrics) *ProxyHandler
func (*ProxyHandler) HandleProxyRequest ¶
func (p *ProxyHandler) HandleProxyRequest(rw http.ResponseWriter, req *http.Request, targetUrl string, appName string, appCfg *config.Application)
func (*ProxyHandler) UnavailableError ¶
func (p *ProxyHandler) UnavailableError(rw http.ResponseWriter, req *http.Request, appName string)
Click to show internal directories.
Click to hide internal directories.