A control flow handler defines a collection of functions which determine how requests and responses are handled through the Vault client.
A _control flow handler_ defines a collection of functions which determine how requests and responses are handled through the Vault client.
(call-sync f client & args)
Call the given function on the client, passing any additional args. Waits for the result to be ready using the client's flow handler.
Call the given function on the client, passing any additional args. Waits for the result to be ready using the client's flow handler.
The completable future handler will immediately return a CompletableFuture
value to the caller. The future will asynchronously yield either the response
data (on success) or an exception (on error).
The completable future handler will immediately return a `CompletableFuture` value to the caller. The future will asynchronously yield either the response data (on success) or an exception (on error).
Protocol for a handler which controls how client requests should be exposed to the consumer of the Vault APIs.
Protocol for a handler which controls how client requests should be exposed to the consumer of the Vault APIs.
(await handler result)
(await handler result timeout-ms timeout-val)
Wait for the given call to complete, blocking the current thread if
necessary. Returns the response value on success, throws an exception on
failure, or returns timeout-val
if supplied and timeout-ms
milliseconds
pass while waiting.
This will be invoked on the value returned by the call
method, not the
internal state object.
Wait for the given call to complete, blocking the current thread if necessary. Returns the response value on success, throws an exception on failure, or returns `timeout-val` if supplied and `timeout-ms` milliseconds pass while waiting. This will be invoked on the value returned by the `call` method, not the internal state object.
(call handler info f)
Create a new state container and invoke the function on it to initiate a
request. Returns the result object the client should see. The info
map
may contain additional observability information.
Create a new state container and invoke the function on it to initiate a request. Returns the result object the client should see. The `info` map may contain additional observability information.
(on-error! handler state info ex)
Callback indicating a failure response with the given exception. Should modify the state; the result of this call is not used.
Callback indicating a failure response with the given exception. Should modify the state; the result of this call is not used.
(on-success! handler state info data)
Callback indicating a successful response with the given response data. Should modify the state; the result of this call is not used.
Callback indicating a successful response with the given response data. Should modify the state; the result of this call is not used.
The promise handler will immediately return a promise
value to the caller.
The promise will asynchronously yield either the response data (on success)
or an exception (on error).
Note that dereferencing the promise will return the error instead of
throwing it, unless await
is used.
The promise handler will immediately return a `promise` value to the caller. The promise will asynchronously yield either the response data (on success) or an exception (on error). Note that dereferencing the promise will _return_ the error instead of throwing it, unless `await` is used.
The synchronous handler will block the thread calling the API and will return either the response data (on success) or throw an exception (on error).
The synchronous handler will block the thread calling the API and will return either the response data (on success) or throw an exception (on error).
(throwing-deref pending)
(throwing-deref pending timeout-ms timeout-val)
A variant of deref
which will throw if the pending value yields an
exception.
A variant of `deref` which will throw if the pending value yields an exception.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close