Liking cljdoc? Tell your friends :D

Linear Search Router

Motivation

Provides the user with the most control over routing outside of implementing a custom router.

Why use it?

You require precise control over routing and the routing performance tradeoff is acceptable to your service.

How to use it?

Add the key :io.pedestal.http/router to the service-map.adoc with the value :linear-search.

Caveats

This implementation routes requests in linear time, so it’s the simplest and slowest of Pedestal’s router implementations.

Additional Notes

Pedestal’s first router implementation.

Query and path constraints are used in routing decisions unlike the prefix-tree-router.adoc or map-tree-router.adoc. That is, if a route is considered (based on path, method, and so forth) but the path or query parameters violate the constraints defined in the route, then the search will continue. For the other routers, a route is matched and then either used, or (if constraints do not match) the entire request is treated as unrouted.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close