HellHound’s http router namespace. DOCTODO


(execute-interceptors hellhound-context interceptors req)

Executes the given intercetors chain by creating a new context map from the hellhound-context and passing it to each intercaptor.

Pedestal routes library returns a map for the matched route. In that map Pedestal provides a key called :interceptors which its value is a chain (collection) of intercaptors assigned to the route in question. In order to execute the chain we used the io.pedestal.interceptor.chain/execute function and pass it a new context map for each interceptor. The context contains input and output of the webserver component along side with the incoming reqeust map.



(matching-route-map routes)

Given the full sequence of route-maps, return a single map, keyed by path, whose value is a function matching on the req. The function takes a request, matches criteria and constraints, and returns the most specific match. This function only processes the routes if all routes are static.


(route-handler hellhound-context routes)

The default ring handler to be used with a ring webserver (webserver component) which is responsible for resolving routes.

This handler is responsible for resolving routes with the incomming request and executing the chain of interceptors. It creates a context map and pass it to each interceptor.


(router routes)

Given a sequence of routes, return a router which satisfies the io.pedestal.http.route.router/Router protocol.