Liking cljdoc? Tell your friends :D

boundary.devtools.shell.router

Stateful router management for runtime route/tap modifications. Tracks dynamic routes and taps in atoms, rebuilds the handler via platform's swap-handler!.

Stateful router management for runtime route/tap modifications.
Tracks dynamic routes and taps in atoms, rebuilds the handler via
platform's swap-handler!.
raw docstring

add-dynamic-route!clj

(add-dynamic-route! method path handler-fn)
source

add-tap!clj

(add-tap! handler-name tap-fn)
source

apply-dynamic-routesclj

(apply-dynamic-routes base-routes)
source

apply-tapsclj

(apply-taps routes)
source

clear-all-state!clj

(clear-all-state!)

Clear ALL dynamic state including taps. Use for full cleanup.

Clear ALL dynamic state including taps. Use for full cleanup.
sourceraw docstring

clear-dynamic-state!clj

(clear-dynamic-state!)

Clear ephemeral dynamic state on reset. Taps are NOT cleared — they persist across resets because (reset) is the documented way to activate them.

Clear ephemeral dynamic state on reset.
Taps are NOT cleared — they persist across resets because (reset) is the
documented way to activate them.
sourceraw docstring

has-taps?clj

(has-taps?)
source

list-dynamic-routesclj

(list-dynamic-routes)
source

list-tapsclj

(list-taps)
source

rebuild-router!clj

(rebuild-router! base-routes compile-fn swap-fn)

Rebuild the HTTP handler with current dynamic routes and taps applied.

Rebuild the HTTP handler with current dynamic routes and taps applied.
sourceraw docstring

remove-dynamic-route!clj

(remove-dynamic-route! method path)
source

remove-tap!clj

(remove-tap! handler-name)
source

wrap-dynamic-dispatchclj

(wrap-dynamic-dispatch base-handler)

Ring middleware that checks dynamic routes via a Reitit router. Supports path parameters (e.g. /api/foo/:id matches /api/foo/123). Matched requests go through the standard HTTP middleware stack (params, cookies, content negotiation/body parsing via Muuntaja) so dynamic handlers behave like normal Boundary routes. Otherwise the request falls through to the base handler.

Ring middleware that checks dynamic routes via a Reitit router.
Supports path parameters (e.g. /api/foo/:id matches /api/foo/123).
Matched requests go through the standard HTTP middleware stack
(params, cookies, content negotiation/body parsing via Muuntaja)
so dynamic handlers behave like normal Boundary routes.
Otherwise the request falls through to the base handler.
sourceraw docstring

wrap-tapsclj

(wrap-taps base-handler)

Ring middleware that invokes registered tap callbacks. Uses the Reitit router (from handler metadata) to pre-match the request. Matches taps in order of preference:

  1. Route :name keyword (exact match — works for all named routes)
  2. Handler function string (regex match — fallback for unnamed routes) The tap receives {:request request :match match-data} and its return value replaces the context (allowing request modification).
Ring middleware that invokes registered tap callbacks.
Uses the Reitit router (from handler metadata) to pre-match the request.
Matches taps in order of preference:
1. Route :name keyword (exact match — works for all named routes)
2. Handler function string (regex match — fallback for unnamed routes)
The tap receives {:request request :match match-data} and its return
value replaces the context (allowing request modification).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close