-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Bump version - API docs in docs/ - Update README.md
- Loading branch information
Showing
10 changed files
with
798 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html PUBLIC "" | ||
""> | ||
<html><head><meta charset="UTF-8" /><title>abci.host documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Abci</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>abci</span></div></div></li><li class="depth-2 current"><a href="abci.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-3"><a href="abci.host.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="abci.host.html#var-CODE-ERROR"><div class="inner"><span>CODE-ERROR</span></div></a></li><li class="depth-1"><a href="abci.host.html#var-CODE-OK"><div class="inner"><span>CODE-OK</span></div></a></li><li class="depth-1"><a href="abci.host.html#var-default-port"><div class="inner"><span>default-port</span></div></a></li><li class="depth-1"><a href="abci.host.html#var-start"><div class="inner"><span>start</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">abci.host</h1><div class="doc"><div class="markdown"><p>Idiomatic <a href="https://tendermint.com/">Tendermint</a> ABCI host implementation.</p></div></div><div class="public anchor" id="var-CODE-ERROR"><h3>CODE-ERROR</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Integer failure <code>:code</code>. See <a href="abci.host.middleware.html#var-wrap-code-keywords">abci.host.middleware/wrap-code-keywords</a>.</p></div></div></div><div class="public anchor" id="var-CODE-OK"><h3>CODE-OK</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Integer success <code>:code</code>. See <a href="abci.host.middleware.html#var-wrap-code-keywords">abci.host.middleware/wrap-code-keywords</a>.</p></div></div></div><div class="public anchor" id="var-default-port"><h3>default-port</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Default host port. See <a href="abci.host.html#var-start">start</a>’s <code>opts</code> map.</p></div></div></div><div class="public anchor" id="var-start"><h3>start</h3><div class="usage"><code>(start handler & [opts])</code></div><div class="doc"><div class="markdown"><p>Accept Tendermint ABCI connections on the <code>:port</code> specified in <code>opts</code>, or <a href="abci.host.html#var-default-port">default-port</a>. Pass incoming messages to <code>handler</code> (<code>map -> Deferred | ||
map</code> - see <a href="abci.host.middleware.html#var-wrap-synchronous">abci.host.middleware/wrap-synchronous</a>), using its return value as the response to each request.</p> | ||
<p>Return the result of Aleph’s <a href="https://aleph.io/codox/aleph/aleph.tcp.html">start-server</a>.</p></div></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html PUBLIC "" | ||
""> | ||
<html><head><meta charset="UTF-8" /><title>abci.host.middleware documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Abci</span> <span class="project-version">0.1.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>abci</span></div></div></li><li class="depth-2"><a href="abci.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-3 current"><a href="abci.host.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="abci.host.middleware.html#var-default-response"><div class="inner"><span>default-response</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-code-keywords"><div class="inner"><span>wrap-code-keywords</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-default"><div class="inner"><span>wrap-default</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-envelope"><div class="inner"><span>wrap-envelope</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-prewalk-replace"><div class="inner"><span>wrap-prewalk-replace</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-request-envelope"><div class="inner"><span>wrap-request-envelope</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-response-envelope"><div class="inner"><span>wrap-response-envelope</span></div></a></li><li class="depth-1"><a href="abci.host.middleware.html#var-wrap-synchronous"><div class="inner"><span>wrap-synchronous</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">abci.host.middleware</h1><div class="doc"><div class="markdown"><p>Utility functions for transforming ABCI handler functions. All middleware assumes asynchronous handler functions, excepting <a href="abci.host.middleware.html#var-wrap-synchronous">wrap-synchronous</a>.</p></div></div><div class="public anchor" id="var-default-response"><h3>default-response</h3><div class="usage"><code>(default-response v & [{envelop? :envelop?, :or {envelop? true}}])</code></div><div class="doc"><div class="markdown"><p>Convenience. Return the default response for the given request keyword, the <code>:stickler/msg</code> value of the given map, or the <code>:stickler/msg</code> key of its <code>:stickler.one-of/value</code>, when enveloped.</p> | ||
<p>Result will be stripped of its <code>:abci/Response</code> envelope when not <code>:envelop?</code>.</p> | ||
<pre><code class="clojure">(default-response :abci/RequestDeliverTx) | ||
(default-response {:stickler/msg :abci/RequestDeliverTx ...}) | ||
(default-response {:stickler/msg :abci/Request | ||
:stickler.one-of/value :deliver-tx | ||
:deliver-tx {:stickler/msg :abci/RequestDeliverTx ...}}) | ||
</code></pre></div></div></div><div class="public anchor" id="var-wrap-code-keywords"><h3>wrap-code-keywords</h3><div class="usage"><code>(wrap-code-keywords f)</code></div><div class="doc"><div class="markdown"><p>Wrap <code>f</code> such that the structure its deferred resolves to is walked, substituting keywords in the <code>abci.code</code> namespace (<code>:abci.code/ok</code>, <code>:abci.code/error</code>) with the corresponding numbers (0, 1).</p></div></div></div><div class="public anchor" id="var-wrap-default"><h3>wrap-default</h3><div class="usage"><code>(wrap-default f & [opts])</code></div><div class="doc"><div class="markdown"><p>If the deferred returned by <code>f</code> resolves to <code>::default</code>, substitute it for a request-appropriate success response.</p> | ||
<p>If <code>opts</code> contains a <code>:predicate</code> key, its value will be used over <code>(partial | ||
identical? ::default)</code> when determining whether to substitute a return value.</p></div></div></div><div class="public anchor" id="var-wrap-envelope"><h3>wrap-envelope</h3><div class="usage"><code>(wrap-envelope f)</code></div><div class="doc"><div class="markdown"><p>Use both <a href="abci.host.middleware.html#var-wrap-request-envelope">wrap-request-envelope</a> and <a href="abci.host.middleware.html#var-wrap-response-envelope">wrap-response-envelope</a> with their default configuration.</p></div></div></div><div class="public anchor" id="var-wrap-prewalk-replace"><h3>wrap-prewalk-replace</h3><div class="usage"><code>(wrap-prewalk-replace f substitutions)</code></div><div class="doc"><div class="markdown"><p>Wrap <code>f</code> such that the structure its deferred resolves to is passed to <code>walk/prewalk-replace</code>, with the given <code>substitutions</code> map.</p></div></div></div><div class="public anchor" id="var-wrap-request-envelope"><h3>wrap-request-envelope</h3><div class="usage"><code>(wrap-request-envelope f & [{lift-key? :lift-key?, :or {lift-key? #{:abci.host/conn}}}])</code></div><div class="doc"><div class="markdown"><p>Wrap <code>f</code> such that it receives the <code>:stickler.one-of/value</code> map for each incoming <code>:abci/Request</code>, rather than the request map itself.</p> | ||
<p>Pass-through values which don’t appear to be enveloped.</p></div></div></div><div class="public anchor" id="var-wrap-response-envelope"><h3>wrap-response-envelope</h3><div class="usage"><code>(wrap-response-envelope f & [{lift-key? :lift-key?, :or {lift-key? nil}}])</code></div><div class="doc"><div class="markdown"><p>Wrap <code>f</code> such that its eventual result is wrapped in an <code>:abci/Response</code>.</p> | ||
<p>Pass-through values which appear enveloped.</p></div></div></div><div class="public anchor" id="var-wrap-synchronous"><h3>wrap-synchronous</h3><div class="usage"><code>(wrap-synchronous f & [opts])</code></div><div class="doc"><div class="markdown"><p>Wrap <code>f</code> such that calls to it are initiated from a worker thread, using <a href="https://aleph.io/codox/manifold/manifold.deferred.html#var-future-with">future-with</a>. The wrapped function will always return a deferred.</p> | ||
<p>The default executor may be overridden by providing <code>:executor</code> in <code>opts</code>.</p></div></div></div></div></body></html> |
Oops, something went wrong.