pallet.crate documentation

Pallet Crate Writing API

admin-group

fn

[]

User that remote commands are run under

admin-user

fn

[]

Id of the target-node.

assoc-settings

fn

[facility kv-pairs {:keys [instance-id], :as options}]
[facility kv-pairs]

Set the settings for the specified host facility. The instance-id allows the specification of specific instance of the facility (the default is :default).

blobstore

fn

[]

Returns the current blobstore.

compute-service

fn

[]

Returns the current compute service

def-aggregate-plan-fn

macro

[name doc-string? attr-map? [params*] f]

Define a crate function where arguments on successive calls are conjoined, and passed to the function specified in the body.

def-collect-plan-fn

macro

[name doc-string? attr-map? [params*] f]

Define a crate function where arguments on successive calls are conjoined, and passed to the function specified in the body.

defmulti-plan

macro

[name docstring? attr-map? dispatch-fn & {:keys [hierarchy], :as options}]

Declare a multimethod for plan functions

defplan

macro

[name doc-string? attr-map? [params*] body]

Define a crate function.

final-fn-sym?

fn

[sym form]

Predicate to match the final function symbol in a form.

get-node-settings

fn

[node facility {:keys [instance-id default], :as options}]
[node facility]

Retrieve the settings for the facility on the node. The instance-id allows the specification of specific instance of the facility. If passed a nil instance-id, then :default is used

get-settings

fn

[facility {:keys [instance-id default], :as options}]
[facility]

Retrieve the settings for the specified host facility. The instance-id allows the specification of specific instance of the facility. If passed a nil instance-id, then :default is used

group-name

fn

[]

Group-Name of the target-node.

groups-with-role

fn

[role]

All target groups with the specified role.

is-64bit?

fn

[]

Predicate for a 64 bit target

nodes-in-group

fn

[group-name]
[]

All nodesin the same tag as the target-node, or with the specified group-name.

nodes-with-role

fn

[role]

All target nodes with the specified role.

os-family

fn

[]

OS-Family of the target-node.

os-version

fn

[]

OS-Family of the target-node.

phase-context

macro

[pipeline-name event & args]

Defines a block with a context that is automatically added.

role->nodes-map

fn

[]

A map from role to nodes.

service-phases

fn

[facility options service-f & {:keys [actions], :or {actions [:start :stop :restart :status]}}]

Return a map of service phases for the specified facility, options and service function. Optionally, specify :actions with a sequence of keywords for the actions you wish to generate service control phases for.

session-peek-fn

macro

[[sym] & body]

Create a state-m monadic value function that examines the session, and returns nil.

target

fn

[]

The target-node map.

target-flag?

fn

[flag]

Returns a DelayedFunction that is a predicate for whether the flag is set

target-id

fn

[]

Id of the target-node (unique for provider).

target-name

fn

[]

Name of the target-node.

target-node

fn

[]

The target-node instance (the :node in the target-node map).

target-nodes

fn

[]

All target-nodes.

targets

fn

[]

All targets.

targets-in-group

fn

[group-name]
[]

All targets in the same tag as the target-node, or with the specified group-name.

targets-with-role

fn

[role]

All targets with the specified role.

update-settings

fn

[facility f & args]
[facility options f & args]

Update the settings for the specified host facility. The instance-id allows the specification of specific instance of the facility (the default is :default).