Documentation
¶
Index ¶
- func ConvertToRequestCallDTO(rc RequestCall) storage.RequestCallDTO
- func HandleHealthcheck(res http.ResponseWriter, req *http.Request)
- func HandleRequest(res http.ResponseWriter, req *http.Request)
- type RequestCall
- func (rc *RequestCall) FixRequest(url url.URL, upstream config.Upstream)
- func (rc RequestCall) GetScheme() string
- func (rc RequestCall) HandlePurge(domainConfig *config.Configuration)
- func (rc RequestCall) HandleRequestAndProxy(domainConfig *config.Configuration)
- func (rc RequestCall) RedirectToHTTPS(redirectStatusCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToRequestCallDTO ¶
func ConvertToRequestCallDTO(rc RequestCall) storage.RequestCallDTO
ConvertToRequestCallDTO - Generates a storage DTO containing request, response and cache settings.
func HandleHealthcheck ¶
func HandleHealthcheck(res http.ResponseWriter, req *http.Request)
HandleHealthcheck - Returns healthcheck status.
func HandleRequest ¶
func HandleRequest(res http.ResponseWriter, req *http.Request)
HandleRequest - Handles the entrypoint and directs the traffic to the right handler.
Types ¶
type RequestCall ¶
type RequestCall struct {
Response *response.LoggedResponseWriter
Request *http.Request
}
RequestCall - Main object containing request and response.
func (*RequestCall) FixRequest ¶
func (rc *RequestCall) FixRequest(url url.URL, upstream config.Upstream)
FixRequest - Fixes the Request in order to use the load balanced host.
func (RequestCall) GetScheme ¶
func (rc RequestCall) GetScheme() string
GetScheme - Returns current request scheme For server requests the URL is parsed from the URI supplied on the Request-Line as stored in RequestURI. For most requests, fields other than Path and RawQuery will be empty. (See RFC 7230, Section 5.3) Ref: https://github.com/golang/go/issues/28940
func (RequestCall) HandlePurge ¶
func (rc RequestCall) HandlePurge(domainConfig *config.Configuration)
HandlePurge - Purges the cache for the requested URI.
func (RequestCall) HandleRequestAndProxy ¶
func (rc RequestCall) HandleRequestAndProxy(domainConfig *config.Configuration)
HandleRequestAndProxy - Handles the requests and proxies to backend server.
func (RequestCall) RedirectToHTTPS ¶
func (rc RequestCall) RedirectToHTTPS(redirectStatusCode int)
RedirectToHTTPS - Redirects from HTTP to HTTPS.