Behaviours: gen_server.
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.
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 may (?) need to (re-)implement some components in a non-Erlang/BEAM-based language.
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.
For a higher level interface, seemachi_cr_client
.
For a lower level interface, see machi_flu1_client
.
append_chunk/4 | Append a chunk (binary- or iolist-style) of data to a file
with Prefix . |
append_chunk/5 | Append a chunk (binary- or iolist-style) of data to a file
with Prefix . |
append_chunk_extra/5 | Append a chunk (binary- or iolist-style) of data to a file
with Prefix . |
append_chunk_extra/6 | Append a chunk (binary- or iolist-style) of data to a file
with Prefix . |
checksum_list/3 | Fetch the list of chunk checksums for File . |
checksum_list/4 | Fetch the list of chunk checksums for File . |
code_change/3 | |
get_all_projections/2 | Get all projections from the FLU's projection store. |
get_all_projections/3 | Get all projections from the FLU's projection store. |
get_epoch_id/1 | Get the epoch_id() of the FLU's current/latest projection. |
get_epoch_id/2 | Get the epoch_id() of the FLU's current/latest projection. |
get_latest_epochid/2 | Get the latest epoch number + checksum from the FLU's projection store. |
get_latest_epochid/3 | Get the latest epoch number + checksum from the FLU's projection store. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
list_all_projections/2 | Get all epoch numbers from the FLU's projection store. |
list_all_projections/3 | Get all epoch numbers from the FLU's projection store. |
list_files/2 | Fetch the list of all files on the remote FLU. |
list_files/3 | Fetch the list of all files on the remote FLU. |
quit/1 | Quit & close the connection to remote FLU and stop our proxy process. |
read_chunk/5 | Read a chunk of data of size Size from File at Offset . |
read_chunk/6 | Read a chunk of data of size Size from File at Offset . |
read_latest_projection/2 | Get the latest projection from the FLU's projection store for ProjType |
read_latest_projection/3 | Get the latest projection from the FLU's projection store for ProjType |
read_projection/3 | Read a projection Proj of type ProjType . |
read_projection/4 | Read a projection Proj of type ProjType . |
start_link/1 | Start a local, long-lived process that will be our steady & reliable communication proxy with the fickle & flaky remote Machi server. |
start_proxies/1 | |
stop_proxies/1 | |
terminate/2 | |
wedge_status/1 | Fetch the wedge status from the remote FLU. |
wedge_status/2 | Fetch the wedge status from the remote FLU. |
write_chunk/5 | Write a chunk (binary- or iolist-style) of data to a file
with Prefix at Offset . |
write_chunk/6 | Write a chunk (binary- or iolist-style) of data to a file
with Prefix at Offset . |
write_projection/3 | Write a projection Proj of type ProjType . |
write_projection/4 | Write a projection Proj of type ProjType . |
append_chunk(PidSpec, EpochID, Prefix, Chunk) -> any()
Append a chunk (binary- or iolist-style) of data to a file
with Prefix
.
append_chunk(PidSpec, EpochID, Prefix, Chunk, Timeout) -> any()
Append a chunk (binary- or iolist-style) of data to a file
with Prefix
.
append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra) -> any()
Append a chunk (binary- or iolist-style) of data to a file
with Prefix
.
append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra, Timeout) -> any()
Append a chunk (binary- or iolist-style) of data to a file
with Prefix
.
checksum_list(PidSpec, EpochID, File) -> any()
Fetch the list of chunk checksums for File
.
checksum_list(PidSpec, EpochID, File, Timeout) -> any()
Fetch the list of chunk checksums for File
.
code_change(OldVsn, S, Extra) -> any()
get_all_projections(PidSpec, ProjType) -> any()
Get all projections from the FLU's projection store.
get_all_projections(PidSpec, ProjType, Timeout) -> any()
Get all projections from the FLU's projection store.
get_epoch_id(PidSpec) -> any()
Get the epoch_id()
of the FLU's current/latest projection.
get_epoch_id(PidSpec, Timeout) -> any()
Get the epoch_id()
of the FLU's current/latest projection.
get_latest_epochid(PidSpec, ProjType) -> any()
Get the latest epoch number + checksum from the FLU's projection store.
get_latest_epochid(PidSpec, ProjType, Timeout) -> any()
Get the latest epoch number + checksum from the FLU's projection store.
handle_call(Request, From, S) -> any()
handle_cast(Msg, S) -> any()
handle_info(Info, S) -> any()
init(X1) -> any()
list_all_projections(PidSpec, ProjType) -> any()
Get all epoch numbers from the FLU's projection store.
list_all_projections(PidSpec, ProjType, Timeout) -> any()
Get all epoch numbers from the FLU's projection store.
list_files(PidSpec, EpochID) -> any()
Fetch the list of all files on the remote FLU.
list_files(PidSpec, EpochID, Timeout) -> any()
Fetch the list of all files on the remote FLU.
quit(PidSpec) -> any()
Quit & close the connection to remote FLU and stop our proxy process.
read_chunk(PidSpec, EpochID, File, Offset, Size) -> any()
Read a chunk of data of size Size
from File
at Offset
.
read_chunk(PidSpec, EpochID, File, Offset, Size, Timeout) -> any()
Read a chunk of data of size Size
from File
at Offset
.
read_latest_projection(PidSpec, ProjType) -> any()
Get the latest projection from the FLU's projection store for ProjType
read_latest_projection(PidSpec, ProjType, Timeout) -> any()
Get the latest projection from the FLU's projection store for ProjType
read_projection(PidSpec, ProjType, Epoch) -> any()
Read a projection Proj
of type ProjType
.
read_projection(PidSpec, ProjType, Epoch, Timeout) -> any()
Read a projection Proj
of type ProjType
.
start_link(P_srvr) -> any()
Start a local, long-lived process that will be our steady & reliable communication proxy with the fickle & flaky remote Machi server.
start_proxies(MembersDict) -> any()
stop_proxies(ProxiesDict) -> any()
terminate(Reason, S) -> any()
wedge_status(PidSpec) -> any()
Fetch the wedge status from the remote FLU.
wedge_status(PidSpec, Timeout) -> any()
Fetch the wedge status from the remote FLU.
write_chunk(PidSpec, EpochID, File, Offset, Chunk) -> any()
Write a chunk (binary- or iolist-style) of data to a file
with Prefix
at Offset
.
write_chunk(PidSpec, EpochID, File, Offset, Chunk, Timeout) -> any()
Write a chunk (binary- or iolist-style) of data to a file
with Prefix
at Offset
.
write_projection(PidSpec, ProjType, Proj) -> any()
Write a projection Proj
of type ProjType
.
write_projection(PidSpec, ProjType, Proj, Timeout) -> any()
Write a projection Proj
of type ProjType
.
Generated by EDoc, May 20 2015, 12:58:33.