Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(policySelector *config.PolicySelector, policies []config.Policy, logger log.Logger) func(http.Handler) http.Handler
Middleware returns a HTTP middleware containing the router.
func SetRoutingInfo ¶
func SetRoutingInfo(parent context.Context, ri RoutingInfo) context.Context
SetRoutingInfo puts the routing info in the context.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router handles the routing of HTTP requests according to the given policies.
type RoutingInfo ¶
type RoutingInfo struct {
// contains filtered or unexported fields
}
RoutingInfo contains the proxy director and some information about the route.
func ContextRoutingInfo ¶
func ContextRoutingInfo(ctx context.Context) RoutingInfo
ContextRoutingInfo gets the routing information from the context.
func (RoutingInfo) Director ¶
func (r RoutingInfo) Director() func(*http.Request)
Director returns the proxy director.
func (RoutingInfo) IsRouteUnprotected ¶
func (r RoutingInfo) IsRouteUnprotected() bool
IsRouteUnprotected returns true if the route doesn't need to be authenticated.
Click to show internal directories.
Click to hide internal directories.