Browse files

Update docs

  • Loading branch information...
1 parent 7005a0d commit b691b4aca029b32e0edd56c8d9b6b2bc73847800 @norton norton committed Mar 26, 2013
Showing with 184 additions and 108 deletions.
  1. +4 −4 README.md
  2. +7 −7 doc/README.md
  3. +97 −45 doc/ruf.md
  4. +17 −17 doc/ruf_driver.md
  5. +22 −10 doc/ruf_term.md
  6. +35 −23 doc/ubf_redis_plugin.md
  7. +1 −1 doc/ubf_redis_types_plugin.md
  8. +1 −1 rebar.config.doc
View
8 README.md
@@ -1,11 +1,11 @@
-#Universal Binary Format and Redis#
-
+# Universal Binary Format and Redis #
Copyright (c) 2012-2013 by Joseph Wayne Norton
-__Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).<p>This is UBF-REDIS, a framework for integrating UBF and the Redis
+__Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).
+<p>This is UBF-REDIS, a framework for integrating UBF and the Redis
Unified Format (RUF) protocol. This repository depends on the ubf
open source repository.</p>
<p><em>This repository is experimental in nature - use at your own risk and
@@ -633,7 +633,7 @@ Implement real "statem" test model for the Redis Proxy.
-##Modules##
+## Modules ##
<table width="100%" border="0" summary="list of modules">
View
14 doc/README.md
@@ -1,11 +1,11 @@
-#Universal Binary Format and Redis#
-
+# Universal Binary Format and Redis #
Copyright (c) 2012-2013 by Joseph Wayne Norton
-__Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).<p>This is UBF-REDIS, a framework for integrating UBF and the Redis
+__Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).
+<p>This is UBF-REDIS, a framework for integrating UBF and the Redis
Unified Format (RUF) protocol. This repository depends on the ubf
open source repository.</p>
<p><em>This repository is experimental in nature - use at your own risk and
@@ -209,7 +209,7 @@ Erlang - <a href="http://www.erlang.org/">http://www.erlang.org/</a>
<ul>
<li>
<p>
-<strong>R13B04 or newer, R15B02 has been tested most recently</strong>
+<strong>R14B04 or newer, R16B has been tested most recently</strong>
</p>
</li>
</ul>
@@ -221,7 +221,7 @@ Git - <a href="http://git-scm.com/">http://git-scm.com/</a>
<ul>
<li>
<p>
-<strong>Git 1.5.4 or newer, Git 1.8.0 has been tested most recently</strong>
+<strong>Git 1.5.4 or newer, Git 1.8.2 has been tested most recently</strong>
</p>
</li>
<li>
@@ -243,7 +243,7 @@ Python - <a href="http://www.python.org">http://www.python.org</a>
<ul>
<li>
<p>
-<strong>Python 2.4 or newer, Python 2.7.2 has been tested most recently
+<strong>Python 2.4 or newer, Python 2.7.3 has been tested most recently
(CAUTION: Python 3.x might be too new)</strong>
</p>
</li>
@@ -633,7 +633,7 @@ Implement real "statem" test model for the Redis Proxy.
-##Modules##
+## Modules ##
<table width="100%" border="0" summary="list of modules">
View
142 doc/ruf.md
@@ -1,51 +1,67 @@
-#Module ruf#
+# Module ruf #
* [Data Types](#types)
* [Function Index](#index)
* [Function Details](#functions)
-
__Behaviours:__ [`contract_proto`](contract_proto.md).
+
<a name="types"></a>
-##Data Types##
+## Data Types ##
+
+
+
+
+### <a name="type-cont">cont()</a> ###
+<pre><code>
+cont() = {more, function()}
+</code></pre>
-###<a name="type-cont">cont()</a>##
-<pre>cont() = {more, function()}</pre>
+### <a name="type-error">error()</a> ###
-###<a name="type-error">error()</a>##
+<pre><code>
+error() = {error, Reason::term()}
+</code></pre>
-<pre>error() = {error, Reason::term()}</pre>
-###<a name="type-ok">ok()</a>##
+### <a name="type-ok">ok()</a> ###
-<pre>ok() = {done, Output::<a href="#type-ruf">ruf()</a>, Remainder::binary(), VSN::string()}</pre>
+<pre><code>
+ok() = {done, Output::<a href="#type-ruf">ruf()</a>, Remainder::binary(), VSN::string()}
+</code></pre>
-###<a name="type-ruf">ruf()</a>##
+### <a name="type-ruf">ruf()</a> ###
+
+
+
+<pre><code>
+ruf() = {ok, binary()} | {error, binary()} | integer() | binary() | [binary()]
+</code></pre>
+
-<pre>ruf() = {ok, binary()} | {error, binary()} | integer() | binary() | [binary()]</pre>
<a name="index"></a>
-##Function Index##
+## Function Index ##
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#atom_to_binary-1">atom_to_binary/1</a></td><td></td></tr><tr><td valign="top"><a href="#binary_to_atom-1">binary_to_atom/1</a></td><td></td></tr><tr><td valign="top"><a href="#binary_to_existing_atom-1">binary_to_existing_atom/1</a></td><td></td></tr><tr><td valign="top"><a href="#contract_records-0">contract_records/0</a></td><td><p>Redis Unified Format</p>
@@ -251,33 +267,32 @@ Erlang (sans CR LF)
<a name="functions"></a>
-##Function Details##
+## Function Details ##
<a name="atom_to_binary-1"></a>
-###atom_to_binary/1##
-
+### atom_to_binary/1 ###
`atom_to_binary(X) -> any()`
-<a name="binary_to_atom-1"></a>
-###binary_to_atom/1##
+<a name="binary_to_atom-1"></a>
+### binary_to_atom/1 ###
`binary_to_atom(X) -> any()`
-<a name="binary_to_existing_atom-1"></a>
-###binary_to_existing_atom/1##
+<a name="binary_to_existing_atom-1"></a>
+### binary_to_existing_atom/1 ###
`binary_to_existing_atom(X) -> any()`
-<a name="contract_records-0"></a>
-###contract_records/0##
+<a name="contract_records-0"></a>
+### contract_records/0 ###
`contract_records() -> any()`
@@ -480,105 +495,142 @@ Erlang (sans CR LF)
</dl>
</dd>
</dl>
+
<a name="decode-1"></a>
-###decode/1##
+### decode/1 ###
+
+<pre><code>
+decode(Input::binary()) -&gt; <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a>
+</code></pre>
-<pre>decode(Input::binary()) -> <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a></pre>
<br></br>
+
<a name="decode-2"></a>
-###decode/2##
+### decode/2 ###
+
+<pre><code>
+decode(Input::binary(), Mod::module()) -&gt; <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a>
+</code></pre>
-<pre>decode(Input::binary(), Mod::module()) -> <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a></pre>
<br></br>
+
<a name="decode-3"></a>
-###decode/3##
+### decode/3 ###
+
+<pre><code>
+decode(Input::binary(), Mod::module(), X3::<a href="#type-cont">cont()</a>) -&gt; <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a>
+</code></pre>
-<pre>decode(Input::binary(), Mod::module(), X3::<a href="#type-cont">cont()</a>) -> <a href="#type-ok">ok()</a> | <a href="#type-error">error()</a> | <a href="#type-cont">cont()</a></pre>
<br></br>
+
<a name="decode_init-0"></a>
-###decode_init/0##
+### decode_init/0 ###
-<pre>decode_init() -> <a href="#type-cont">cont()</a></pre>
+<pre><code>
+decode_init() -&gt; <a href="#type-cont">cont()</a>
+</code></pre>
+
<br></br>
+
<a name="decode_init-1"></a>
-###decode_init/1##
+### decode_init/1 ###
+
+<pre><code>
+decode_init(Safe::boolean()) -&gt; <a href="#type-cont">cont()</a>
+</code></pre>
-<pre>decode_init(Safe::boolean()) -> <a href="#type-cont">cont()</a></pre>
<br></br>
+
<a name="decode_init-2"></a>
-###decode_init/2##
+### decode_init/2 ###
+
+<pre><code>
+decode_init(Safe::boolean(), Input::binary()) -&gt; <a href="#type-cont">cont()</a>
+</code></pre>
-<pre>decode_init(Safe::boolean(), Input::binary()) -> <a href="#type-cont">cont()</a></pre>
<br></br>
+
<a name="encode-1"></a>
-###encode/1##
+### encode/1 ###
-<pre>encode(Input::<a href="#type-ruf">ruf()</a>) -> iolist() | no_return()</pre>
+<pre><code>
+encode(Input::<a href="#type-ruf">ruf()</a>) -&gt; iolist() | no_return()
+</code></pre>
+
<br></br>
+
<a name="encode-2"></a>
-###encode/2##
+### encode/2 ###
-<pre>encode(Input::<a href="#type-ruf">ruf()</a>, Mod::module()) -> iolist() | no_return()</pre>
+<pre><code>
+encode(Input::<a href="#type-ruf">ruf()</a>, Mod::module()) -&gt; iolist() | no_return()
+</code></pre>
+
<br></br>
+
<a name="encode-3"></a>
-###encode/3##
+### encode/3 ###
+
+<pre><code>
+encode(Input::<a href="#type-ruf">ruf()</a>, Mod::module(), VSN::undefined | string()) -&gt; iolist() | no_return()
+</code></pre>
-<pre>encode(Input::<a href="#type-ruf">ruf()</a>, Mod::module(), VSN::undefined | string()) -> iolist() | no_return()</pre>
<br></br>
-<a name="proto_driver-0"></a>
-###proto_driver/0##
+<a name="proto_driver-0"></a>
+### proto_driver/0 ###
`proto_driver() -> any()`
-<a name="proto_packet_type-0"></a>
-###proto_packet_type/0##
+<a name="proto_packet_type-0"></a>
+### proto_packet_type/0 ###
`proto_packet_type() -> any()`
-<a name="proto_vsn-0"></a>
-###proto_vsn/0##
+<a name="proto_vsn-0"></a>
+### proto_vsn/0 ###
`proto_vsn() -> any()`
+
View
34 doc/ruf_driver.md
@@ -1,65 +1,65 @@
-#Module ruf_driver#
+# Module ruf_driver #
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
<p>Protocol driver process for RUF (Redis Binary Format)
protocol sessions.</p>.
+__Behaviours:__ [`contract_driver`](contract_driver.md).
+<a name="index"></a>
-__Behaviours:__ [`contract_driver`](contract_driver.md).<a name="index"></a>
-
-##Function Index##
+## Function Index ##
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decode-4">decode/4</a></td><td></td></tr><tr><td valign="top"><a href="#encode-3">encode/3</a></td><td></td></tr><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr><tr><td valign="top"><a href="#init-2">init/2</a></td><td></td></tr><tr><td valign="top"><a href="#start-1">start/1</a></td><td></td></tr><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr></table>
<a name="functions"></a>
-##Function Details##
+## Function Details ##
<a name="decode-4"></a>
-###decode/4##
-
+### decode/4 ###
`decode(Contract, Safe, Cont, Binary) -> any()`
-<a name="encode-3"></a>
-###encode/3##
+<a name="encode-3"></a>
+### encode/3 ###
`encode(Contract, Safe, Term) -> any()`
-<a name="init-1"></a>
-###init/1##
+<a name="init-1"></a>
+### init/1 ###
`init(Contract) -> any()`
-<a name="init-2"></a>
-###init/2##
+<a name="init-2"></a>
+### init/2 ###
`init(Contract, Options) -> any()`
-<a name="start-1"></a>
-###start/1##
+<a name="start-1"></a>
+### start/1 ###
`start(Contract) -> any()`
-<a name="start-2"></a>
-###start/2##
+<a name="start-2"></a>
+### start/2 ###
`start(Contract, Options) -> any()`
+
View
32 doc/ruf_term.md
@@ -1,6 +1,6 @@
-#Module ruf_term#
+# Module ruf_term #
* [Data Types](#types)
* [Function Index](#index)
* [Function Details](#functions)
@@ -9,19 +9,23 @@
<a name="types"></a>
-##Data Types##
+## Data Types ##
-###<a name="type-ruf">ruf()</a>##
+### <a name="type-ruf">ruf()</a> ###
-<pre>ruf() = <a href="ruf.md#type-ruf">ruf:ruf()</a></pre>
+<pre><code>
+ruf() = <a href="ruf.md#type-ruf">ruf:ruf()</a>
+</code></pre>
+
+
<a name="index"></a>
-##Function Index##
+## Function Index ##
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decode-3">decode/3</a></td><td></td></tr><tr><td valign="top"><a href="#encode-4">encode/4</a></td><td><p>Redis Unified Format - Erlang Term Format</p>
@@ -39,23 +43,30 @@ conventions for requests and responses.</code></pre>
<a name="functions"></a>
-##Function Details##
+## Function Details ##
<a name="decode-3"></a>
-###decode/3##
+### decode/3 ###
+
+<pre><code>
+decode(Input::term(), Contract::module(), VSN::undefined | string()) -&gt; <a href="#type-ruf">ruf()</a> | no_return()
+</code></pre>
-<pre>decode(Input::term(), Contract::module(), VSN::undefined | string()) -> <a href="#type-ruf">ruf()</a> | no_return()</pre>
<br></br>
+
<a name="encode-4"></a>
-###encode/4##
+### encode/4 ###
+
+<pre><code>
+encode(Input::<a href="#type-ruf">ruf()</a>, Contract::module(), VSN::undefined | string(), Safe::boolean()) -&gt; term() | no_return()
+</code></pre>
-<pre>encode(Input::<a href="#type-ruf">ruf()</a>, Contract::module(), VSN::undefined | string(), Safe::boolean()) -> term() | no_return()</pre>
<br></br>
@@ -70,3 +81,4 @@ Unified Format and Erlang Term Format.</code></pre>
<pre><code>NOTE: This module acts as bridge between Redis and Erlang
conventions for requests and responses.</code></pre>
+
View
58 doc/ubf_redis_plugin.md
@@ -1,96 +1,108 @@
-#Module ubf_redis_plugin#
+# Module ubf_redis_plugin #
* [Description](#description)
* [Function Index](#index)
* [Function Details](#functions)
<p>Sample Redis contract.</p>.
+__Behaviours:__ [`ubf_plugin_stateless`](ubf_plugin_stateless.md).
+<a name="index"></a>
-__Behaviours:__ [`ubf_plugin_stateless`](ubf_plugin_stateless.md).<a name="index"></a>
-
-##Function Index##
+## Function Index ##
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#description-0">description/0</a></td><td></td></tr><tr><td valign="top"><a href="#handlerEvent-1">handlerEvent/1</a></td><td></td></tr><tr><td valign="top"><a href="#handlerRpc-1">handlerRpc/1</a></td><td><p>rpc handler</p>.</td></tr><tr><td valign="top"><a href="#handlerStart-1">handlerStart/1</a></td><td><p>start handler</p>.</td></tr><tr><td valign="top"><a href="#handlerStop-3">handlerStop/3</a></td><td><p>stop handler</p>.</td></tr><tr><td valign="top"><a href="#info-0">info/0</a></td><td></td></tr><tr><td valign="top"><a href="#keepalive-0">keepalive/0</a></td><td></td></tr><tr><td valign="top"><a href="#moduleRestart-1">moduleRestart/1</a></td><td><p>restart module</p>.</td></tr><tr><td valign="top"><a href="#moduleStart-1">moduleStart/1</a></td><td><p>start module</p>.</td></tr></table>
<a name="functions"></a>
-##Function Details##
+## Function Details ##
<a name="description-0"></a>
-###description/0##
-
+### description/0 ###
`description() -> any()`
-<a name="handlerEvent-1"></a>
-###handlerEvent/1##
+<a name="handlerEvent-1"></a>
+### handlerEvent/1 ###
`handlerEvent(Event) -> any()`
+
<a name="handlerRpc-1"></a>
-###handlerRpc/1##
+### handlerRpc/1 ###
-<pre>handlerRpc(Event::any()) -&gt; Reply::any()</pre>
+<pre><code>
+handlerRpc(Event::any()) -&gt; Reply::any()
+</code></pre>
+
<br></br>
<p>rpc handler</p>
+
<a name="handlerStart-1"></a>
-###handlerStart/1##
+### handlerStart/1 ###
+
+<pre><code>
+handlerStart(Args::[any()]) -&gt; {accept, Reply::any(), StateName::atom(), StateData::term()} | {reject, Reason::any()}
+</code></pre>
-<pre>handlerStart(Args::[any()]) -&gt; {accept, Reply::any(), StateName::atom(), StateData::term()} | {reject, Reason::any()}</pre>
<br></br>
<p>start handler</p>
+
<a name="handlerStop-3"></a>
-###handlerStop/3##
+### handlerStop/3 ###
+
+<pre><code>
+handlerStop(Pid::pid(), Reason::any(), StateData::term()) -&gt; none()
+</code></pre>
-<pre>handlerStop(Pid::pid(), Reason::any(), StateData::term()) -&gt; none()</pre>
<br></br>
<p>stop handler</p>
-<a name="info-0"></a>
-###info/0##
+<a name="info-0"></a>
+### info/0 ###
`info() -> any()`
-<a name="keepalive-0"></a>
-###keepalive/0##
+<a name="keepalive-0"></a>
+### keepalive/0 ###
`keepalive() -> any()`
-<a name="moduleRestart-1"></a>
-###moduleRestart/1##
+<a name="moduleRestart-1"></a>
+### moduleRestart/1 ###
`moduleRestart(Args) -> any()`
<p>restart module</p>
-<a name="moduleStart-1"></a>
-###moduleStart/1##
+<a name="moduleStart-1"></a>
+### moduleStart/1 ###
`moduleStart(Args) -> any()`
<p>start module</p>
+
View
2 doc/ubf_redis_types_plugin.md
@@ -1,6 +1,6 @@
-#Module ubf_redis_types_plugin#
+# Module ubf_redis_types_plugin #
* [Description](#description)
View
2 rebar.config.doc
@@ -6,7 +6,7 @@
, {packages, false}
, {stylesheet, ""} % don't copy stylesheet.css
, {image, ""} % don't copy erlang.png
- , {top_level_readme, {"./README.md", "https://github.com/ubf/ubf-redis"}}
+ , {top_level_readme, {"./README.md", "https://github.com/ubf/ubf-redis", "master"}}
]}.
{deps, [{meck, "", {git, "git://github.com/norton/meck.git"}}

0 comments on commit b691b4a

Please sign in to comment.