<ulclass="index"><li><ahref="#description">Description</a></li><li><ahref="#index">Function Index</a></li><li><ahref="#functions">Function Details</a></li></ul>Erlang API for the Machi FLU TCP protocol version 1, with a
proxy-process style API for hiding messy details such as TCP
connection/disconnection with the remote Machi server.
<h2><aname="description">Description</a></h2><p>Erlang API for the Machi FLU TCP protocol version 1, with a
proxy-process style API for hiding messy details such as TCP
connection/disconnection with the remote Machi server.</p>
<p>Machi is intentionally avoiding using distributed Erlang for
Machi's communication. This design decision makes Erlang-side code
more difficult & complex, but it's the price to pay for some
language independence. Later in Machi's life cycle, we need to
(re-)implement some components in a non-Erlang/BEAM-based language.</p>
This module implements a "man in the middle" proxy between the
Erlang client and Machi server (which is on the "far side" of a TCP
connection to somewhere). This proxy process will always execute
on the same Erlang node as the Erlang client that uses it. The
proxy is intended to be a stable, long-lived process that survives
TCP communication problems with the remote server.
<h2><aname="index">Function Index</a></h2>
<tablewidth="100%"border="1"cellspacing="0"cellpadding="2"summary="function index"><tr><tdvalign="top"><ahref="#append_chunk-4">append_chunk/4</a></td><td>Append a chunk (binary- or iolist-style) of data to a file
with <code>Prefix</code>.</td></tr>
<tr><tdvalign="top"><ahref="#append_chunk-5">append_chunk/5</a></td><td>Append a chunk (binary- or iolist-style) of data to a file
<tr><tdvalign="top"><ahref="#get_epoch_id-1">get_epoch_id/1</a></td><td>Get the <code>epoch_id()</code> of the FLU's current/latest projection.</td></tr>
<tr><tdvalign="top"><ahref="#get_epoch_id-2">get_epoch_id/2</a></td><td>Get the <code>epoch_id()</code> of the FLU's current/latest projection.</td></tr>
<tr><tdvalign="top"><ahref="#get_latest_epochid-2">get_latest_epochid/2</a></td><td>Get the latest epoch number + checksum from the FLU's projection store.</td></tr>
<tr><tdvalign="top"><ahref="#get_latest_epochid-3">get_latest_epochid/3</a></td><td>Get the latest epoch number + checksum from the FLU's projection store.</td></tr>
<tr><tdvalign="top"><ahref="#list_all_projections-2">list_all_projections/2</a></td><td>Get all epoch numbers from the FLU's projection store.</td></tr>
<tr><tdvalign="top"><ahref="#list_all_projections-3">list_all_projections/3</a></td><td>Get all epoch numbers from the FLU's projection store.</td></tr>
<tr><tdvalign="top"><ahref="#list_files-2">list_files/2</a></td><td>Fetch the list of all files on the remote FLU.</td></tr>
<tr><tdvalign="top"><ahref="#list_files-3">list_files/3</a></td><td>Fetch the list of all files on the remote FLU.</td></tr>
<tr><tdvalign="top"><ahref="#quit-1">quit/1</a></td><td>Quit & close the connection to remote FLU and stop our
proxy process.</td></tr>
<tr><tdvalign="top"><ahref="#read_chunk-5">read_chunk/5</a></td><td>Read a chunk of data of size <code>Size</code> from <code>File</code> at <code>Offset</code>.</td></tr>
<tr><tdvalign="top"><ahref="#read_chunk-6">read_chunk/6</a></td><td>Read a chunk of data of size <code>Size</code> from <code>File</code> at <code>Offset</code>.</td></tr>
<tr><tdvalign="top"><ahref="#read_latest_projection-2">read_latest_projection/2</a></td><td>Get the latest projection from the FLU's projection store for <code>ProjType</code></td></tr>
<tr><tdvalign="top"><ahref="#read_latest_projection-3">read_latest_projection/3</a></td><td>Get the latest projection from the FLU's projection store for <code>ProjType</code></td></tr>
<tr><tdvalign="top"><ahref="#read_projection-3">read_projection/3</a></td><td>Read a projection <code>Proj</code> of type <code>ProjType</code>.</td></tr>
<tr><tdvalign="top"><ahref="#read_projection-4">read_projection/4</a></td><td>Read a projection <code>Proj</code> of type <code>ProjType</code>.</td></tr>
<tr><tdvalign="top"><ahref="#start_link-1">start_link/1</a></td><td>Start a local, long-lived process that will be our steady
& reliable communication proxy with the fickle & flaky
<tr><tdvalign="top"><ahref="#write_projection-3">write_projection/3</a></td><td>Write a projection <code>Proj</code> of type <code>ProjType</code>.</td></tr>
<tr><tdvalign="top"><ahref="#write_projection-4">write_projection/4</a></td><td>Write a projection <code>Proj</code> of type <code>ProjType</code>.</td></tr>