Liking cljdoc? Tell your friends :D

c3kit.apron.app

Application service and state management. Holds long-lived references (database connections, env, etc.) that should persist across tools.namespace reloads. Services are maps of {:start sym :stop sym} started/stopped via start!/stop!.

Application service and state management. Holds long-lived references (database connections, env, etc.) that should persist across `tools.namespace` reloads. Services are maps of `{:start sym :stop sym}` started/stopped via `start!`/`stop!`.
raw docstring

appclj


development?clj

(development?)

Return true if env resolves to 'development'

Return true if env resolves to 'development'
raw docstring

envclj


env-keysclj


find-envclj

(find-env)
(find-env & keys)

Look for the env value in the system properties, OS environment variables, or default to development

Look for the env value in the system properties, OS environment variables, or default to development
raw docstring

production?clj

(production?)

Return true if env resolves to 'production'

Return true if env resolves to 'production'
raw docstring

resolutionclj

(resolution key)

Returns a deref-able pointer to values stored in app, may return nil

Returns a deref-able pointer to values stored in app, may return nil
raw docstring

resolution!clj

(resolution! key)

Returns a deref-able pointer to values stored in app. An exception is throw when app does not have a value for the key.

Returns a deref-able pointer to values stored in app.
An exception is throw when app does not have a value for the key.
raw docstring

serviceclj

(service start-sym stop-sym)

The start and stop symbols must point to functions that:

  1. start/stop the 'service'
  2. add/remove data from app
The start and stop symbols must point to functions that:
1) start/stop the 'service'
2) add/remove data from app
raw docstring

set-env!clj

(set-env! env)

Imperatively set :env on the global app map. Prefer start-env inside a service start fn for normal startup flow; set-env! is a convenience for scripts and the REPL.

Imperatively set `:env` on the global `app` map. Prefer `start-env` inside
a service start fn for normal startup flow; `set-env!` is a convenience for
scripts and the REPL.
raw docstring

start!clj

(start! services)

Start each service in services in declaration order. Each service map's :start symbol must point to a fn (fn [app] new-app) that updates the global app map (typically by assoc-ing whatever resource it manages).

Start each service in `services` in declaration order. Each service map's
`:start` symbol must point to a fn `(fn [app] new-app)` that updates the
global `app` map (typically by `assoc`-ing whatever resource it manages).
raw docstring

start-envclj

(start-env app)
(start-env app & keys)

To be used as in a start service fn.

To be used as in a start service fn.
raw docstring

stop!clj

(stop! services)

Stop services in reverse declaration order. Each service map's :stop symbol must point to a fn (fn [app] new-app) that tears down the resource and removes it from the global app map.

Stop services in *reverse* declaration order. Each service map's `:stop`
symbol must point to a fn `(fn [app] new-app)` that tears down the resource
and removes it from the global `app` map.
raw docstring

stop-envclj

(stop-env app)

To be used as in a stop service fn.

To be used as in a stop service fn.
raw 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