Liking cljdoc? Tell your friends :D

pallet.action

Actions are the primitives that are called by crate functions.

Actions can have multiple implementations, but by default most are implemented as script to be executed on the remote node.

An action has an :execution, which is one of :aggregated, :in-sequence, :collected, :delayed-crate-fn or :aggregated-crate-fn.

Calls to :aggregated actions will be grouped, and run before :in-sequence actions. Calls to :collected actions will be grouped, and run after :in-sequence actions.

Calls to :delayed-crate-fn and :aggregated-crate-fn actions are evaluated at action plan translation time, which provides a mechanism for calling crate functions after all other crate functions have been called.

Actions are the primitives that are called by crate functions.

Actions can have multiple implementations, but by default most are
implemented as script to be executed on the remote node.

An action has an :execution, which is one of :aggregated, :in-sequence,
:collected, :delayed-crate-fn or :aggregated-crate-fn.

Calls to :aggregated actions will be grouped, and run before
:in-sequence actions. Calls to :collected actions will be grouped, and run
after :in-sequence actions.

Calls to :delayed-crate-fn and :aggregated-crate-fn actions are evaluated
at action plan translation time, which provides a mechanism for calling
crate functions after all other crate functions have been called.
raw docstring

action-fnclj

(action-fn action-inserter dispatch-val)

Returns the function for an implementation of an action from an action inserter.

Returns the function for an implementation of an action from an action
inserter.
sourceraw docstring

action-optionsclj

(action-options session)

Return any action-options currently defined on the session.

Return any action-options currently defined on the session.
sourceraw docstring

assoc-action-optionsclj

(assoc-action-options m)

Set precedence modifiers defined on the session.

Set precedence modifiers defined on the session.
sourceraw docstring

clj-actionclj/smacro

(clj-action args & impl)

Creates a clojure action with a :direct implementation.

Creates a clojure action with a :direct implementation.
sourceraw docstring

clj-action-fnclj/smacro

(clj-action-fn args & impl)

Creates a clojure action with a :direct implementation. The first argument will be the session. The clojure code can not return a modified session (use a full action to do that.

Creates a clojure action with a :direct implementation. The first argument
will be the session. The clojure code can not return a modified session (use a
full action to do that.
sourceraw docstring

declare-actionclj

(declare-action action-symbol metadata)

Declare an action. The action-name is a symbol (not necessarily referring to a Var).

The execution model can be specified using the :execution key in metadata, with one of the following possible values:

:in-sequence - The generated action will be applied to the node "in order", as it is defined lexically in the source crate. This is the default. :aggregated - All aggregated actions are applied to the node in the order they are defined, but before all :in-sequence actions. Note that all of the arguments to any given action function are gathered such that there is only ever one invocation of each fn within each phase. :collected - All collected actions are applied to the node in the order they are defined, but after all :in-sequence action. Note that all of the arguments to any given action function are gathered such that there is only ever one invocation of each fn within each phase. :delayed-crate-fn - delayed crate functions are phase functions that are executed at action-plan translation time. :aggregated-crate-fn - aggregate crate functions are phase functions that are executed at action-plan translation time, with aggregated arguments, as for :aggregated.

Declare an action. The action-name is a symbol (not necessarily referring to
a Var).

 The execution model can be specified using the :execution key in `metadata`,
 with one of the following possible values:

 :in-sequence - The generated action will be applied to the node
      "in order", as it is defined lexically in the source crate.
      This is the default.
 :aggregated - All aggregated actions are applied to the node
      in the order they are defined, but before all :in-sequence
      actions. Note that all of the arguments to any given
      action function are gathered such that there is only ever one
      invocation of each fn within each phase.
 :collected - All collected actions are applied to the node
      in the order they are defined, but after all :in-sequence
      action. Note that all of the arguments to any given
      action function are gathered such that there is only ever one
      invocation of each fn within each phase.
 :delayed-crate-fn - delayed crate functions are phase functions that
      are executed at action-plan translation time.
 :aggregated-crate-fn - aggregate crate functions are phase functions that are
      executed at action-plan translation time, with aggregated arguments, as
      for :aggregated.
sourceraw docstring

declare-aggregated-crate-actionclj

(declare-aggregated-crate-action sym f)

Declare an action for an aggregated crate function. A delayed crate function becomes an action with a single, :default, implementation.

Declare an action for an aggregated crate function. A delayed crate function
becomes an action with a single, :default, implementation.
sourceraw docstring

declare-collected-crate-actionclj

(declare-collected-crate-action sym f)

Declare an action for an collected crate function. A delayed crate function becomes an action with a single, :default, implementation.

Declare an action for an collected crate function. A delayed crate function
becomes an action with a single, :default, implementation.
sourceraw docstring

declare-delayed-crate-actionclj

(declare-delayed-crate-action sym f)

Declare an action for a delayed crate function. A delayed crate function becomes an action with a single, :default, implementation.

Declare an action for a delayed crate function. A delayed crate function
becomes an action with a single, :default, implementation.
sourceraw docstring

defactionclj/smacro

(defaction action-name attr-map? [params*])

Declares a named action.

Declares a named action.
sourceraw docstring

enter-scopeclj

(enter-scope)

Enter a new action scope.

Enter a new action scope.
sourceraw docstring

get-action-optionsclj

(get-action-options)

Return any action-options currently defined on the session.

Return any action-options currently defined on the session.
sourceraw docstring

implement-actionclj/smacro

(implement-action action-name dispatch-val attr-map? [params*])

Define an implementation of an action. The dispatch-val is used to dispatch on.

Define an implementation of an action. The dispatch-val is used to dispatch
on.
sourceraw docstring

implement-action*clj

(implement-action* action-inserter dispatch-val metadata f)

Define an implementation of an action given the action-inserter function.

Define an implementation of an action given the `action-inserter` function.
sourceraw docstring

implementationclj

(implementation {:keys [action] :as action-map} dispatch-val)

Returns the metadata and function for an implementation of an action from an action map.

Returns the metadata and function for an implementation of an action from an
action map.
sourceraw docstring

insert-actionclj

(insert-action session 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.
sourceraw docstring

leave-scopeclj

(leave-scope)

Leave the current action scope.

Leave the current action scope.
sourceraw docstring

update-action-optionsclj

(update-action-options m)

Update any precedence modifiers defined on the session

Update any precedence modifiers defined on the session
sourceraw docstring

with-action-optionsclj/smacro

(with-action-options m & body)

Set up local precedence relations between actions, and allows override of user options.

:script-dir : Controls the directory the script is executed in.

:sudo-user : Controls the user the action runs as.

:script-prefix : Specify a prefix for the script. Disable sudo using :no-sudo. Defaults to :sudo.

:script-env : Specify a map of environment variables.

:script-comments : Control the generation of script line number comments

:new-login-after-action : Force a new ssh login after the action. Useful if the action effects the login environment and you want the affect to be visible immediately.

Set up local precedence relations between actions, and allows override
of user options.

`:script-dir`
: Controls the directory the script is executed in.

`:sudo-user`
: Controls the user the action runs as.

`:script-prefix`
: Specify a prefix for the script. Disable sudo using `:no-sudo`. Defaults to
  `:sudo`.

`:script-env`
: Specify a map of environment variables.

`:script-comments`
: Control the generation of script line number comments

`:new-login-after-action`
: Force a new ssh login after the action.  Useful if the action effects the
  login environment and you want the affect to be visible immediately.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close