Liking cljdoc? Tell your friends :D

jepsen.control

Provides SSH control over a remote node. There's a lot of dynamically bound state in this namespace because we want to make it as simple as possible for scripts to open connections to various nodes.

Provides SSH control over a remote node. There's a lot of dynamically bound
state in this namespace because we want to make it as simple as possible for
scripts to open connections to various nodes.
raw docstring

*dir*clj

Working directory

Working directory
raw docstring

*dummy*clj

When true, don't actually use SSH

When true, don't actually use SSH
raw docstring

*host*clj

Current hostname

Current hostname
raw docstring

*password*clj

Password (for login and sudo)

Password (for login and sudo)
raw docstring

*port*clj

SSH listening port

SSH listening port
raw docstring

*private-key-path*clj

SSH identity file

SSH identity file
raw docstring

*retries*clj

How many times to retry conns

How many times to retry conns
raw docstring

*session*clj

Current clj-ssh session wrapper

Current clj-ssh session wrapper
raw docstring

*strict-host-key-checking*clj

Verify SSH host keys

Verify SSH host keys
raw docstring

*sudo*clj

User to sudo to

User to sudo to
raw docstring

*trace*clj

Shall we trace commands?

Shall we trace commands?
raw docstring

*username*clj

Username

Username
raw docstring

cdcljmacro

(cd dir & body)

Evaluates forms in the given directory.

Evaluates forms in the given directory.
raw docstring

check-nameclj

(check-name host)

Ensures a given hostname is string. Warns user if legacy behavior passes in a keyword host. TODO This can be removed when tests no tests generate keyword hosts. CLI already refuses keyword hostnames.

Ensures a given hostname is string. Warns user if legacy behavior passes in a
keyword host.
TODO This can be removed when tests no tests generate keyword hosts. CLI already
     refuses keyword hostnames.
raw docstring

clj-ssh-sessionclj

(clj-ssh-session host)

Opens a raw session to the given host.

Opens a raw session to the given host.
raw docstring

debug-dataclj

(debug-data)

Construct a map of SSH data for debugging purposes.

Construct a map of SSH data for debugging purposes.
raw docstring

disconnectclj

(disconnect session)

Close a session

Close a session
raw docstring

downloadclj

(download & args)

Copies remote paths to local node. Takes arguments for clj-ssh/scp-from. Retres failures.

Copies remote paths to local node. Takes arguments for clj-ssh/scp-from.
Retres failures.
raw docstring

escapeclj

(escape s)

Escapes a thing for the shell.

Nils are empty strings.

Literal wrappers are passed through directly.

The special keywords :>, :>>, and :< map to their corresponding shell I/O redirection operators.

Named things like keywords and symbols use their name, escaped. Strings are escaped like normal.

Sequential collections and sets have each element escaped and space-separated.

Escapes a thing for the shell.

Nils are empty strings.

Literal wrappers are passed through directly.

The special keywords :>, :>>, and :< map to their corresponding shell I/O
redirection operators.

Named things like keywords and symbols use their name, escaped. Strings are
escaped like normal.

Sequential collections and sets have each element escaped and
space-separated.
raw docstring

execclj

(exec & commands)

Takes a shell command and arguments, runs the command, and returns stdout, throwing if an error occurs. Escapes all arguments.

Takes a shell command and arguments, runs the command, and returns stdout,
throwing if an error occurs. Escapes all arguments.
raw docstring

exec*clj

(exec* & commands)

Like exec, but does not escape.

Like exec, but does not escape.
raw docstring

expand-pathclj

(expand-path path)

Expands path relative to the current directory.

Expands path relative to the current directory.
raw docstring

file->pathclj

(file->path x)

Takes an object, if it's an instance of java.io.File, gets the path, otherwise returns the object

Takes an object, if it's an instance of java.io.File, gets the path, otherwise
returns the object
raw docstring

just-stdoutclj

(just-stdout result)

Returns the stdout from an ssh result, trimming any newlines at the end.

Returns the stdout from an ssh result, trimming any newlines at the end.
raw docstring

litclj

(lit s)

A literal string to be passed, unescaped, to the shell.

A literal string to be passed, unescaped, to the shell.
raw docstring

oncljmacro

(on host & body)

Opens a session to the given host and evaluates body there; and closes session when body completes.

Opens a session to the given host and evaluates body there; and closes
session when body completes.
raw docstring

on-manycljmacro

(on-many hosts & body)

Takes a list of hosts, executes body on each host in parallel, and returns a map of hosts to return values.

Takes a list of hosts, executes body on each host in parallel, and returns a
map of hosts to return values.
raw docstring

on-nodesclj

(on-nodes test f)
(on-nodes test nodes f)

Given a test, evaluates (f test node) in parallel on each node, with that node's SSH connection bound. If nodes is provided, evaluates only on those nodes in particular.

Given a test, evaluates (f test node) in parallel on each node, with that
node's SSH connection bound. If `nodes` is provided, evaluates only on those
nodes in particular.
raw docstring

scp*clj

(scp* current-path node-path)

Evaluates an SCP from the current host to the node.

Evaluates an SCP from the current host to the node.
raw docstring

sessionclj

(session host)

Wraps clj-ssh-session in a wrapper for reconnection.

Wraps clj-ssh-session in a wrapper for reconnection.
raw docstring

ssh*clj

(ssh* action)

Evaluates an SSH action against the current host. Retries packet corrupt errors.

Evaluates an SSH action against the current host. Retries packet corrupt
errors.
raw docstring

sucljmacro

(su & body)

sudo root ...

sudo root ...
raw docstring

sudocljmacro

(sudo user & body)

Evaluates forms with a particular user.

Evaluates forms with a particular user.
raw docstring

throw-on-nonzero-exitclj

(throw-on-nonzero-exit {:keys [exit action] :as result})

Throws when an SSH result has nonzero exit status.

Throws when an SSH result has nonzero exit status.
raw docstring

tracecljmacro

(trace & body)

Evaluates forms with command tracing enabled.

Evaluates forms with command tracing enabled.
raw docstring

uploadclj

(upload & [local-paths remote-path & remaining])

Copies local path(s) to remote node and returns the remote path. Takes arguments for clj-ssh/scp-to.

Copies local path(s) to remote node and returns the remote path.
Takes arguments for clj-ssh/scp-to.
raw docstring

with-sessioncljmacro

(with-session host session & body)

Binds a host and session and evaluates body. Does not open or close session; this is just for the namespace dynamics state.

Binds a host and session and evaluates body. Does not open or close session;
this is just for the namespace dynamics state.
raw docstring

with-sshcljmacro

(with-ssh ssh & body)

Takes a map of SSH configuration and evaluates body in that scope. Catches JSchExceptions and re-throws with all available debugging context. Options:

:dummy? :username :password :private-key-path :strict-host-key-checking

Takes a map of SSH configuration and evaluates body in that scope. Catches
JSchExceptions and re-throws with all available debugging context. Options:

:dummy?
:username
:password
:private-key-path
:strict-host-key-checking
raw docstring

with-test-nodescljmacro

(with-test-nodes test & body)

Given a test, evaluates body in parallel on each node, with that node's SSH connection bound.

Given a test, evaluates body in parallel on each node, with that node's SSH
connection bound.
raw docstring

wrap-cdclj

(wrap-cd cmd)

Wraps command by changing to the current bound directory first.

Wraps command by changing to the current bound directory first.
raw docstring

wrap-sudoclj

(wrap-sudo cmd)

Wraps command in a sudo subshell.

Wraps command in a sudo subshell.
raw docstring

wrap-traceclj

(wrap-trace arg)

Logs argument to console when tracing is enabled.

Logs argument to console when tracing is enabled.
raw docstring

|clj

A literal pipe character.

A literal pipe character.
raw docstring

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

× close