Liking cljdoc? Tell your friends :D

lite.client

The ClientAdapter abstraction: the protocol a user implements to bind Jepsen Lite to their target's protocol, plus the outcome signalling (fail! / info!) and the exception -> :type wrapping their handlers rely on.

Nothing in this namespace knows how the target is deployed (in-process, local-process, http, compose, ...). That is the other, orthogonal axis and it must never leak in here.

The ClientAdapter abstraction: the protocol a user implements to bind Jepsen
Lite to their target's *protocol*, plus the outcome signalling
(`fail!` / `info!`) and the exception -> `:type` wrapping their handlers rely
on.

Nothing in this namespace knows how the target is deployed (in-process,
local-process, http, compose, ...). That is the other, orthogonal axis and it
must never leak in here.
raw docstring

ClientAdaptercljprotocol

Binds Jepsen Lite to one target protocol.

open and close must be idempotent / safely re-runnable: they are called repeatedly over a run (a later milestone implements the crash nemesis as close -> open).

Binds Jepsen Lite to one target protocol.

`open` and `close` must be idempotent / safely re-runnable: they are called
repeatedly over a run (a later milestone implements the crash nemesis as
close -> open).

closeclj

(close this conn)

Tears conn down. Must tolerate an already-closed or nil conn.

Tears conn down. Must tolerate an already-closed or nil conn.

invokeclj

(invoke this conn op)

Applies one op against conn by running the user's handler through complete, and returns the completed, :type-tagged op.

Applies one op against conn by running the user's handler through
`complete`, and returns the completed, `:type`-tagged op.

openclj

(open this)

Establishes a connection / instance and returns the conn handle.

Establishes a connection / instance and returns the conn handle.
sourceraw docstring

completeclj

(complete handler conn op)

Runs (handler conn op) and turns its result into a completed op:

returns normally -> :ok, return value attached as :value throws fail! -> :fail, msg attached as :error throws info! -> :info, reason attached as :error throws anything else -> :info (an unexpected error is indeterminate; we never call it :ok, nor a clean :fail)

All other fields of the invoked op (:f, :process, ...) are preserved.

Runs `(handler conn op)` and turns its result into a completed op:

  returns normally     -> `:ok`, return value attached as `:value`
  throws `fail!`       -> `:fail`, msg attached as `:error`
  throws `info!`       -> `:info`, reason attached as `:error`
  throws anything else -> `:info` (an unexpected error is indeterminate; we
                          never call it `:ok`, nor a clean `:fail`)

All other fields of the invoked op (`:f`, `:process`, ...) are preserved.
sourceraw docstring

fail!clj

(fail! msg)

Signals a certain failure from inside a handler: the operation definitely did not take effect (CAS mismatch, rejected write, ...). Yields :type :fail.

Signals a *certain* failure from inside a handler: the operation definitely
did not take effect (CAS mismatch, rejected write, ...). Yields `:type :fail`.
sourceraw docstring

info!clj

(info! reason)

Signals an indeterminate outcome from inside a handler: the operation may or may not have taken effect (timeout, dropped connection, ...). Yields :type :info.

Signals an *indeterminate* outcome from inside a handler: the operation may
or may not have taken effect (timeout, dropped connection, ...). Yields
`:type :info`.
sourceraw 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