Liking cljdoc? Tell your friends :D

Prefix Tree Router

Motivation

Provide a performant router which is efficient in time and space.

The implementation is modeled after httprouter, a library for Go.

Why use it?

Most performant builtin router implementation when dynamic routes (those using path parameters and wildcards) are required. The prefix tree router operates in logarithmic time.

How to use it?

Add the key :io.pedestal.http/router to the service map with the value :prefix-tree.

Caveats

Provides less control over routing. For example, Wild card routes always win. The path /foo/:bar will always match over /foo/baz.

Additional Notes

Like the map-tree-router.adoc, query and path constraints are not used in routing decisions. They are only used to invalidate a route match.

Can you improve this documentation?Edit on GitHub

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

× close