An action plan contains instances of actions (action maps) for execution.
The action plan is built by executing a phase function. Each phase function calls actions which insert themselves into the action plan.
The action plan is transformed to provide aggregated operations, run delayed crate functions, and to resolve precedence relations between actions.
A translated plan is executed by passing an executor, which is a function that will be passed each action map in the plan. The executor function is responsible for selecting the implementation of the action to be used, and calling the implementation with the action-map arguments.
Note this is an implementation namespace.
An action plan contains instances of actions (action maps) for execution. The action plan is built by executing a phase function. Each phase function calls actions which insert themselves into the action plan. The action plan is transformed to provide aggregated operations, run delayed crate functions, and to resolve precedence relations between actions. A translated plan is executed by passing an executor, which is a function that will be passed each action map in the plan. The executor function is responsible for selecting the implementation of the action to be used, and calling the implementation with the action-map arguments. Note this is an implementation namespace.
(action-data session {:keys [action args blocks] :as action-m})
Return an action's data.
Return an action's data.
(action-map action arg-vector {:as options})
Return an action map for the given action
and args
. The action map is an
instance of an action. The action plan is a tree of action maps.
options
specifies naming and dependencies for this instance of the action,
and may contain :action-id, :always-before and :always-after keys. If an
options
is supplied, an action-id is generated if none present, to ensure
that the standard action precedence is not altered. :script-dir
and user
options like :sudo-user
may also be specified. :script-prefix
can
be used to prefix with something other than sudo.
The action is generated by the specified action function and arguments that will be applied to the function when the action plan is executed.
Return an action map for the given `action` and `args`. The action map is an instance of an action. The action plan is a tree of action maps. `options` specifies naming and dependencies for this instance of the action, and may contain :action-id, :always-before and :always-after keys. If an `options` is supplied, an action-id is generated if none present, to ensure that the standard action precedence is not altered. `:script-dir` and user options like `:sudo-user` may also be specified. `:script-prefix` can be used to prefix with something other than sudo. - :action the action that is scheduled, - :args the arguments to pass to the action function, - :context captures the phase context, for use at execution time, - :action-id a keyword that identifies the instance of an action, - :always-before a symbol, keyword or set thereof. A symbol references an action, and a keyword references an instance of an action, - :always-after a symbol, keyword or set thereof, - :node-value-path a symbol specifying a node value (added when scheduled). The action is generated by the specified action function and arguments that will be applied to the function when the action plan is executed.
(action-map-execution action-map)
Helper to return the execution of the action associated with an action-map.
Helper to return the execution of the action associated with an action-map.
(checked-commands name & script)
Return a stevedore script that uses the current context to label the action
Return a stevedore script that uses the current context to label the action
(checked-commands* name scripts)
Return a stevedore script that uses the current context to label the action
Return a stevedore script that uses the current context to label the action
(checked-script name & script)
Return a stevedore script that uses the current context to label the action
Return a stevedore script that uses the current context to label the action
Return a label for an action
Return a label for an action
(defining-context-string)
Returns a context string for the defining phase context.
Returns a context string for the defining phase context.
(execute-action-map executor
session
{:keys [node-value-path context script-comments]
:or {script-comments false}
:as action})
Execute a single action, catching any exception and reporting it as an error map.
Execute a single action, catching any exception and reporting it as an error map.
(execute-if session {:keys [blocks] :as action} value)
Execute an if action
Execute an if action
(map-action-f exec-action action-plan session)
Map exec-action over actions in the action-plan, applying session.
Map exec-action over actions in the action-plan, applying session.
(pop-block action-plan)
Take the last block and add it to the :blocks key of the scope below it in the stack. The block is reversed to put it into the order in which elements were added.
Take the last block and add it to the :blocks key of the scope below it in the stack. The block is reversed to put it into the order in which elements were added.
(push-block action-plan)
Push a block onto the action-plan
Push a block onto the action-plan
(schedule-action-map action-plan action-map)
Registers an action map in the action plan for execution. This function is responsible for creating a node-value (as node-value-path's have to be unique for all instances of an aggregated action) as a handle to the value that will be returned when the action map is executed.
Registers an action map in the action plan for execution. This function is responsible for creating a node-value (as node-value-path's have to be unique for all instances of an aggregated action) as a handle to the value that will be returned when the action map is executed.
(stop-execution-on-error [result session])
:execute-status-fn algorithm to stop execution on an error
:execute-status-fn algorithm to stop execution on an error
(translate action-plan session)
Process the action-plan, applying groupings and precedence, producing an action plan with fully bound functions, ready for execution.
This is equivalent to using an identity monad with a monadic value that is a tree of action maps.
Process the action-plan, applying groupings and precedence, producing an action plan with fully bound functions, ready for execution. This is equivalent to using an identity monad with a monadic value that is a tree of action maps.
(translated? action-plan)
Predicate to test if an action plan has been translated
Predicate to test if an action plan has been translated
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close