Liking cljdoc? Tell your friends :D

systems.bread.alpha.core


*enable-profiling*clj/s

Whether to tap> hook invocations, requests, etc. for debugging purposes. Default false.

Whether to tap> hook invocations, requests, etc. for debugging purposes.
Default false.
raw docstring

*profile-hooks*clj/s

DEPRECATED. Use enable-profiling instead.

DEPRECATED. Use *enable-profiling* instead.
raw docstring

actionclj/smultimethod


add-effectclj/s

(add-effect req e)

Adds e as an Effect to be run during the apply-effects lifecycle phase.

Adds e as an Effect to be run during the apply-effects lifecycle phase.
raw docstring

add-profilerclj/s

(add-profiler f)

Wraps f in a fn that first checks that its sole arg is a valid profiling event, and if so, calls f with its arg. Calls add-tap with the resulting wrapper fn. Returns wrapper for use with remove-tap.

Wraps f in a fn that first checks that its sole arg is a valid profiling
event, and if so, calls f with its arg. Calls add-tap with the resulting
wrapper fn. Returns wrapper for use with remove-tap.
raw docstring

appclj/s

(app)
(app {:keys [plugins]})

Creates a new Bread app. Optionally accepts an options map. A single option is supported, :plugins, a sequence of plugins to load.

Creates a new Bread app. Optionally accepts an options map. A single option
is supported, :plugins, a sequence of plugins to load.
raw docstring

configclj/s

(config app k)
(config app k default)

Returns app's config value for k. Returns the (optionally) provided default if k is not found in app's config map. If k is not found and not default is provided, returns nil.

Returns app's config value for k. Returns the (optionally) provided default
if k is not found in app's config map. If k is not found and not default is
provided, returns nil.
raw docstring

dispatchclj/smultimethod


effectclj/smultimethod


expandclj/smultimethod


handleclj/s

(handle app req)

Takes a Ring request and threads it through the Bread request/response lifecycle.

Takes a Ring request and threads it through the Bread request/response lifecycle.
raw docstring

handlerclj/s

(handler app)

Returns a handler function that takes a Ring request and threads it through the Bread request/response lifecycle.

Returns a handler function that takes a Ring request and threads it
through the Bread request/response lifecycle.
raw docstring

hookclj/s

(hook app h)
(hook app h x)
(hook app h x & args)

Threads app and any (optional) args through any actions for hook h. Calls (action app current-action ...) on successive actions for the given hook, in the order they were added. When passed only two args (an app and a hook), calls (action app current-action nil) repeatedly, returning the modified app. When called with three or more args, calls (action app current-action ...args) repeatedly, returning the (presumably modified) third arg. Note that by convention, actions corresponding to hooks that are called with three or more args operate on - and return modified versions of - the third arg, but this is not enforced.

Threads app and any (optional) args through any actions for hook h. Calls
(action app current-action ...) on successive actions for the given hook, in
the order they were added. When passed only two args (an app and a hook),
calls (action app current-action nil) repeatedly, returning the modified app.
When called with three or more args, calls (action app current-action ...args)
repeatedly, returning the (presumably modified) third arg. Note that by
convention, actions corresponding to hooks that are called with three or more
args operate on - and return modified versions of - the third arg, but this
is not enforced.
raw docstring

infer-paramclj/smultimethod


load-appclj/s

(load-app app)

Loads the given app by calling bootstrap, load-plugins, and init hooks.

Loads the given app by calling bootstrap, load-plugins, and init hooks.
raw docstring

profile*clj/s

(profile* t e)

profile>clj/smacro

(profile> t e)

responseclj/s

(response req raw)

Returns a response with the current app (req) merged into raw map, preserving any hooks/config added to req.

Returns a response with the current app (req) merged into raw map,
preserving any hooks/config added to req.
raw docstring

Routerclj/sprotocol

pathclj/s

(path this route-name params)

route-dispatcherclj/s

(route-dispatcher this req)

route-paramsclj/s

(route-params this req)

route-specclj/s

(route-spec this req)

routesclj/s

(routes this)

set-configclj/s

(set-config app k v & extra)

Sets app's config value for k to v, and so on for any subsequent key/value pairs. Works like assoc.

Sets app's config value for k to v, and so on for any subsequent key/value
pairs. Works like assoc.
raw docstring

shutdownclj/s

(shutdown app)

Shuts down the app, removing all ::systems.bread* keys. Runs the ::shutdown hook, which is useful e.g. for unmounting long-lived application state.

Shuts down the app, removing all ::systems.bread* keys.
Runs the ::shutdown hook, which is useful e.g. for unmounting long-lived
application state.
raw docstring

value->expansionclj/s

(value->expansion k value & {desc :expansion/description})

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