Skip to content

Commit

Permalink
Update version in readme (#61)
Browse files Browse the repository at this point in the history
* Update docs
  • Loading branch information
vtm9 authored and tank-bohr committed Nov 6, 2019
1 parent 434d82f commit 2cbe753
Show file tree
Hide file tree
Showing 11 changed files with 373 additions and 16 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Copyright (c) 2018-2019 Alexey Nikitin

__Version:__ 0.3.3
__Version:__ 0.3.5

__Authors:__ Alexey Nikitin ([`tank@bohr.su`](mailto:tank@bohr.su)) (_web site:_ [`https://twitter.com/tank_bohr`](https://twitter.com/tank_bohr)).

Expand Down Expand Up @@ -52,7 +52,7 @@ First step: add to your rebar config
{profiles, [
{test, [
{deps, [
{bookish_spork, "0.3.3"}
{bookish_spork, "0.3.5"}
]}
]}
]}.
Expand Down Expand Up @@ -252,8 +252,13 @@ For more details see examples dir.

<table width="100%" border="0" summary="list of modules">
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork.md" class="module">bookish_spork</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_acceptor.md" class="module">bookish_spork_acceptor</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_blocking_queue.md" class="module">bookish_spork_blocking_queue</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_format.md" class="module">bookish_spork_format</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_handler.md" class="module">bookish_spork_handler</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_request.md" class="module">bookish_spork_request</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_response.md" class="module">bookish_spork_response</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_server.md" class="module">bookish_spork_server</a></td></tr></table>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_server.md" class="module">bookish_spork_server</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_ssl.md" class="module">bookish_spork_ssl</a></td></tr>
<tr><td><a href="http://github.com/tank-bohr/bookish_spork/blob/master/doc/bookish_spork_sup.md" class="module">bookish_spork_sup</a></td></tr></table>

11 changes: 8 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Copyright (c) 2018-2019 Alexey Nikitin

__Version:__ 0.3.3
__Version:__ 0.3.5

__Authors:__ Alexey Nikitin ([`tank@bohr.su`](mailto:tank@bohr.su)) (_web site:_ [`https://twitter.com/tank_bohr`](https://twitter.com/tank_bohr)).

Expand Down Expand Up @@ -52,7 +52,7 @@ First step: add to your rebar config
{profiles, [
{test, [
{deps, [
{bookish_spork, "0.3.3"}
{bookish_spork, "0.3.5"}
]}
]}
]}.
Expand Down Expand Up @@ -252,8 +252,13 @@ For more details see examples dir.

<table width="100%" border="0" summary="list of modules">
<tr><td><a href="bookish_spork.md" class="module">bookish_spork</a></td></tr>
<tr><td><a href="bookish_spork_acceptor.md" class="module">bookish_spork_acceptor</a></td></tr>
<tr><td><a href="bookish_spork_blocking_queue.md" class="module">bookish_spork_blocking_queue</a></td></tr>
<tr><td><a href="bookish_spork_format.md" class="module">bookish_spork_format</a></td></tr>
<tr><td><a href="bookish_spork_handler.md" class="module">bookish_spork_handler</a></td></tr>
<tr><td><a href="bookish_spork_request.md" class="module">bookish_spork_request</a></td></tr>
<tr><td><a href="bookish_spork_response.md" class="module">bookish_spork_response</a></td></tr>
<tr><td><a href="bookish_spork_server.md" class="module">bookish_spork_server</a></td></tr></table>
<tr><td><a href="bookish_spork_server.md" class="module">bookish_spork_server</a></td></tr>
<tr><td><a href="bookish_spork_ssl.md" class="module">bookish_spork_ssl</a></td></tr>
<tr><td><a href="bookish_spork_sup.md" class="module">bookish_spork_sup</a></td></tr></table>

14 changes: 12 additions & 2 deletions doc/bookish_spork.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stub_request_fun() = fun((<a href="bookish_spork_request.md#type-t">bookish_spor
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#capture_request-0">capture_request/0</a></td><td></td></tr><tr><td valign="top"><a href="#start_server-0">start_server/0</a></td><td>Equivalent to <a href="#start_server-1"><tt>start_server(32002)</tt></a>.</td></tr><tr><td valign="top"><a href="#start_server-1">start_server/1</a></td><td>starts http server on a particular port.</td></tr><tr><td valign="top"><a href="#stop_server-0">stop_server/0</a></td><td>stops http server.</td></tr><tr><td valign="top"><a href="#stub_request-0">stub_request/0</a></td><td>Equivalent to <a href="#stub_request-3"><tt>stub_request(204,
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#capture_request-0">capture_request/0</a></td><td></td></tr><tr><td valign="top"><a href="#capture_request-1">capture_request/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_server-0">start_server/0</a></td><td>Equivalent to <a href="#start_server-1"><tt>start_server(32002)</tt></a>.</td></tr><tr><td valign="top"><a href="#start_server-1">start_server/1</a></td><td>starts http server on a particular port.</td></tr><tr><td valign="top"><a href="#stop_server-0">stop_server/0</a></td><td>stops http server.</td></tr><tr><td valign="top"><a href="#stub_request-0">stub_request/0</a></td><td>Equivalent to <a href="#stub_request-3"><tt>stub_request(204,
#{&lt;&lt;"Server"&gt;&gt; =&gt; &lt;&lt;"BookishSpork/0.0.1"&gt;&gt;,
&lt;&lt;"Date"&gt;&gt; =&gt; &lt;&lt;"Sat, 28 Apr 2018 05:51:50 GMT"&gt;&gt;},
&lt;&lt;&gt;&gt;)</tt></a>.</td></tr><tr><td valign="top"><a href="#stub_request-1">stub_request/1</a></td><td>Equivalent to <a href="#stub_request-2"><tt>stub_request(Response, 1)</tt></a>.</td></tr><tr><td valign="top"><a href="#stub_request-2">stub_request/2</a></td><td>stub request with fun or particular response.</td></tr></table>
Expand All @@ -51,6 +51,16 @@ capture_request() -&gt; {ok, Request::<a href="bookish_spork_request.md#type-t">
</code></pre>
<br />

<a name="capture_request-1"></a>

### capture_request/1 ###

<pre><code>
capture_request(Timeout) -&gt; {ok, Request} | {error, Error}
</code></pre>

<ul class="definitions"><li><code>Error = term()</code></li><li><code>Request = <a href="bookish_spork_request.md#type-t">bookish_spork_request:t()</a></code></li><li><code>Timeout = non_neg_integer()</code></li></ul>

<a name="start_server-0"></a>

### start_server/0 ###
Expand All @@ -67,7 +77,7 @@ Equivalent to [`start_server(32002)`](#start_server-1).
### start_server/1 ###

<pre><code>
start_server(Port::non_neg_integer()) -&gt; {ok, pid()} | {error, Error::term()}
start_server(Options::<a href="proplists.md#type-proplist">proplists:proplist()</a>) -&gt; {ok, pid()} | {error, Error::term()}
</code></pre>
<br />

Expand Down
32 changes: 32 additions & 0 deletions doc/bookish_spork_acceptor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@


# Module bookish_spork_acceptor #
* [Function Index](#index)
* [Function Details](#functions)

__Behaviours:__ [`gen_server`](gen_server.md).

<a name="index"></a>

## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#child_spec-1">child_spec/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_link-3">start_link/3</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="child_spec-1"></a>

### child_spec/1 ###

`child_spec(Args) -> any()`

<a name="start_link-3"></a>

### start_link/3 ###

`start_link(Server, Transport, ListenSocket) -> any()`

69 changes: 69 additions & 0 deletions doc/bookish_spork_blocking_queue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@


# Module bookish_spork_blocking_queue #
* [Data Types](#types)
* [Function Index](#index)
* [Function Details](#functions)

__Behaviours:__ [`gen_server`](gen_server.md).

<a name="types"></a>

## Data Types ##




### <a name="type-element">element()</a> ###


<pre><code>
element() = any()
</code></pre>

<a name="index"></a>

## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#in-2">in/2</a></td><td></td></tr><tr><td valign="top"><a href="#out-1">out/1</a></td><td></td></tr><tr><td valign="top"><a href="#out-2">out/2</a></td><td></td></tr><tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="in-2"></a>

### in/2 ###

<pre><code>
in(Pid::pid(), Element::<a href="#type-element">element()</a>) -&gt; ok
</code></pre>
<br />

<a name="out-1"></a>

### out/1 ###

<pre><code>
out(Pid::pid()) -&gt; {ok, <a href="#type-element">element()</a>} | {error, timeout}
</code></pre>
<br />

<a name="out-2"></a>

### out/2 ###

<pre><code>
out(Pid, Timeout) -&gt; {ok, <a href="#type-element">element()</a>} | {error, timeout}
</code></pre>

<ul class="definitions"><li><code>Pid = pid()</code></li><li><code>Timeout = non_neg_integer() | infinity</code></li></ul>

<a name="start_link-0"></a>

### start_link/0 ###

`start_link() -> any()`

81 changes: 81 additions & 0 deletions doc/bookish_spork_handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@


# Module bookish_spork_handler #
* [Data Types](#types)
* [Function Index](#index)
* [Function Details](#functions)

__Behaviours:__ [`gen_server`](gen_server.md).

<a name="types"></a>

## Data Types ##




### <a name="type-connection_id">connection_id()</a> ###


<pre><code>
connection_id() = binary()
</code></pre>




### <a name="type-socket">socket()</a> ###


<pre><code>
socket() = <a href="gen_tcp.md#type-socket">gen_tcp:socket()</a> | <a href="ssl.md#type-sslsocket">ssl:sslsocket()</a>
</code></pre>




### <a name="type-tls_ext">tls_ext()</a> ###


<pre><code>
tls_ext() = undefined | <a href="ssl.md#type-protocol_extensions">ssl:protocol_extensions()</a>
</code></pre>




### <a name="type-transport">transport()</a> ###


<pre><code>
transport() = gen_tcp | bookish_spork_ssl
</code></pre>

<a name="index"></a>

## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#child_spec-1">child_spec/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_link-5">start_link/5</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="child_spec-1"></a>

### child_spec/1 ###

`child_spec(Args) -> any()`

<a name="start_link-5"></a>

### start_link/5 ###

<pre><code>
start_link(Server, Transport, Socket, TlsExt, ConnectionId) -&gt; {ok, pid()}
</code></pre>

<ul class="definitions"><li><code>Server = pid()</code></li><li><code>Transport = <a href="#type-transport">transport()</a></code></li><li><code>Socket = <a href="#type-socket">socket()</a></code></li><li><code>TlsExt = <a href="#type-tls_ext">tls_ext()</a></code></li><li><code>ConnectionId = <a href="#type-connection_id">connection_id()</a></code></li></ul>

24 changes: 23 additions & 1 deletion doc/bookish_spork_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@



### <a name="type-socket">socket()</a> ###


<pre><code>
socket() = <a href="gen_tcp.md#type-socket">gen_tcp:socket()</a> | <a href="ssl.md#type-sslsocket">ssl:sslsocket()</a>
</code></pre>




### <a name="type-t">t()</a> ###


Expand All @@ -22,7 +32,7 @@ __abstract datatype__: `t()`
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#body-1">body/1</a></td><td>request body.</td></tr><tr><td valign="top"><a href="#content_length-1">content_length/1</a></td><td>Content-Length header value as intger.</td></tr><tr><td valign="top"><a href="#header-2">header/2</a></td><td>Returns a particular header from request.</td></tr><tr><td valign="top"><a href="#headers-1">headers/1</a></td><td>http headers map.</td></tr><tr><td valign="top"><a href="#is_keepalive-1">is_keepalive/1</a></td><td>tells you if the request is keepalive or not <a href="https://tools.ietf.org.md/rfc6223" target="_top"><tt>https://tools.ietf.org/html/rfc6223</tt></a></td></tr><tr><td valign="top"><a href="#method-1">method/1</a></td><td>http verb: 'GET', 'POST','PUT', 'DELETE', 'OPTIONS', ...</td></tr><tr><td valign="top"><a href="#uri-1">uri/1</a></td><td>path with query string.</td></tr><tr><td valign="top"><a href="#version-1">version/1</a></td><td>http protocol version tuple.</td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#body-1">body/1</a></td><td>request body.</td></tr><tr><td valign="top"><a href="#content_length-1">content_length/1</a></td><td>Content-Length header value as intger.</td></tr><tr><td valign="top"><a href="#header-2">header/2</a></td><td>Returns a particular header from request.</td></tr><tr><td valign="top"><a href="#headers-1">headers/1</a></td><td>http headers map.</td></tr><tr><td valign="top"><a href="#is_keepalive-1">is_keepalive/1</a></td><td>tells you if the request is keepalive or not <a href="https://tools.ietf.org.md/rfc6223" target="_top"><tt>https://tools.ietf.org/html/rfc6223</tt></a></td></tr><tr><td valign="top"><a href="#method-1">method/1</a></td><td>http verb: 'GET', 'POST','PUT', 'DELETE', 'OPTIONS', ...</td></tr><tr><td valign="top"><a href="#new-3">new/3</a></td><td>creates request with ssl info if socket is an ssl socket.</td></tr><tr><td valign="top"><a href="#uri-1">uri/1</a></td><td>path with query string.</td></tr><tr><td valign="top"><a href="#version-1">version/1</a></td><td>http protocol version tuple.</td></tr></table>


<a name="functions"></a>
Expand Down Expand Up @@ -95,6 +105,18 @@ method(Request::<a href="#type-t">t()</a>) -&gt; atom()

http verb: 'GET', 'POST','PUT', 'DELETE', 'OPTIONS', ...

<a name="new-3"></a>

### new/3 ###

<pre><code>
new(ConnectionId, Socket, TlsExt) -&gt; Request
</code></pre>

<ul class="definitions"><li><code>ConnectionId = binary()</code></li><li><code>Socket = <a href="#type-socket">socket()</a></code></li><li><code>TlsExt = undefined | nil | <a href="ssl.md#type-protocol_extensions">ssl:protocol_extensions()</a></code></li><li><code>Request = <a href="#type-t">t()</a></code></li></ul>

creates request with ssl info if socket is an ssl socket

<a name="uri-1"></a>

### uri/1 ###
Expand Down
33 changes: 28 additions & 5 deletions doc/bookish_spork_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ response() = <a href="bookish_spork_response.md#type-t">bookish_spork_response:t
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#respond_with-2">respond_with/2</a></td><td></td></tr><tr><td valign="top"><a href="#retrieve_request-0">retrieve_request/0</a></td><td></td></tr><tr><td valign="top"><a href="#start-1">start/1</a></td><td>starts server.</td></tr><tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>stops server.</td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#respond_with-2">respond_with/2</a></td><td></td></tr><tr><td valign="top"><a href="#response-1">response/1</a></td><td>Used by <a href="bookish_spork_acceptor.md"><code>bookish_spork_acceptor</code></a></td></tr><tr><td valign="top"><a href="#retrieve_request-1">retrieve_request/1</a></td><td></td></tr><tr><td valign="top"><a href="#start-1">start/1</a></td><td>starts server.</td></tr><tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>stops server.</td></tr><tr><td valign="top"><a href="#store_request-2">store_request/2</a></td><td>Used by <a href="bookish_spork_acceptor.md"><code>bookish_spork_acceptor</code></a></td></tr></table>


<a name="functions"></a>
Expand All @@ -52,21 +52,33 @@ respond_with(Response::<a href="#type-response">response()</a>, Times::non_neg_i
</code></pre>
<br />

<a name="retrieve_request-0"></a>
<a name="response-1"></a>

### retrieve_request/0 ###
### response/1 ###

<pre><code>
retrieve_request() -&gt; {ok, Request::<a href="#type-request">request()</a>} | {error, Error::term()}
response(Server::pid()) -&gt; {ok, <a href="#type-response">response()</a>} | {error, no_response}
</code></pre>
<br />

Used by [`bookish_spork_acceptor`](bookish_spork_acceptor.md)

<a name="retrieve_request-1"></a>

### retrieve_request/1 ###

<pre><code>
retrieve_request(Timeout) -&gt; {ok, Request} | {error, Error}
</code></pre>

<ul class="definitions"><li><code>Timeout = non_neg_integer()</code></li><li><code>Request = <a href="#type-request">request()</a></code></li><li><code>Error = term()</code></li></ul>

<a name="start-1"></a>

### start/1 ###

<pre><code>
start(Port::non_neg_integer()) -&gt; {ok, pid()} | {error, Error::term()}
start(Options::<a href="proplists.md#type-proplist">proplists:proplist()</a>) -&gt; {ok, pid()} | {error, Error::term()}
</code></pre>
<br />

Expand All @@ -83,3 +95,14 @@ stop() -&gt; ok

stops server

<a name="store_request-2"></a>

### store_request/2 ###

<pre><code>
store_request(Server::pid(), Request::<a href="#type-request">request()</a>) -&gt; ok
</code></pre>
<br />

Used by [`bookish_spork_acceptor`](bookish_spork_acceptor.md)

Loading

0 comments on commit 2cbe753

Please sign in to comment.