Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProxyHandler ¶ added in v0.3.0
func NewProxyHandler(url string) fasthttp.RequestHandler
NewRedirectHandler returns a new redirect handler
func NewRedirectHandler ¶ added in v0.1.0
func NewRedirectHandler(url string, code int) fasthttp.RequestHandler
NewRedirectHandler returns a new redirect handler
Types ¶
type ProxyHandler ¶ added in v0.3.0
type ProxyHandler struct {
// contains filtered or unexported fields
}
RedirectHandler stores the URL and HTTP code of a redirect
func (*ProxyHandler) ServeHTTP ¶ added in v0.3.0
func (r *ProxyHandler) ServeHTTP(ctx *fasthttp.RequestCtx)
ServerHTTP writes a redirect to an HTTP response
type RedirectHandler ¶ added in v0.1.0
type RedirectHandler struct {
// contains filtered or unexported fields
}
RedirectHandler stores the URL and HTTP code of a redirect
func (*RedirectHandler) ServeHTTP ¶ added in v0.1.0
func (r *RedirectHandler) ServeHTTP(ctx *fasthttp.RequestCtx)
ServerHTTP writes a redirect to an HTTP response
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router holds the current routing table
func (*Router) CertificateForService ¶ added in v0.1.0
func (r *Router) CertificateForService(address string) (*tls.Certificate, bool)
CertificateForService returns the certificate for a service (if one exists)
func (*Router) RouteToService ¶ added in v0.1.0
RouteToService returns the correct HTTP handler for a given service's DNS name
func (*Router) UpdateTable ¶
UpdateTable is an atomic operation to update the routing table
Click to show internal directories.
Click to hide internal directories.