Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPathBasedDispatcher ¶
func NewPathBasedDispatcher( cfg *config.Configuration, log *logging.Logger, prx *proxy.ProxyHandler, ) (*pathBasedDispatcher, error)
Types ¶
type Dispatcher ¶
type Dispatcher interface { http.Handler RegisterApplication(string, config.Application, *config.Configuration) error Initialize() error AddBehaviour(...DispatcherBehaviour) }
type DispatcherBehaviour ¶
type DispatcherBehaviour interface {
Apply(httprouter.Handle, httprouter.Handle, Dispatcher, string, *config.Application, *config.Configuration) (httprouter.Handle, httprouter.Handle, error)
}
func NewAuthenticationBehaviour ¶
func NewAuthenticationBehaviour(a auth.AuthDecorator) DispatcherBehaviour
func NewCachingBehaviour ¶
func NewCachingBehaviour(c cache.CacheMiddleware) DispatcherBehaviour
func NewRatelimitBehaviour ¶
func NewRatelimitBehaviour(rlim ratelimit.RateLimitingMiddleware) DispatcherBehaviour
type DispatcherOption ¶
type DispatcherOption func(dispatcherSetters) error
func ProxyHandler ¶
func ProxyHandler(prx *proxy.ProxyHandler) DispatcherOption
type PathClosure ¶
type PathClosure struct {
// contains filtered or unexported fields
}
func (*PathClosure) Handle ¶
func (p *PathClosure) Handle(rw http.ResponseWriter, req *http.Request, params httprouter.Params)
type PatternClosure ¶
type PatternClosure struct {
// contains filtered or unexported fields
}
func (*PatternClosure) Handle ¶
func (p *PatternClosure) Handle(rw http.ResponseWriter, req *http.Request, params httprouter.Params)
type RoutingBehaviour ¶
type RoutingBehaviour interface {
AddRoutes(*httprouter.Router) error
}
Click to show internal directories.
Click to hide internal directories.