Module machi_util

Miscellaneous utility functions.

Description

Miscellaneous utility functions.

Function Index

bin_to_hexstr/1Convert a binary() to a hexadecimal string.
checksum_chunk/1Calculate a checksum for a chunk of file data.
connect/2Create a TCP connection to a remote Machi server.
connect/3Create a TCP connection to a remote Machi server.
hexstr_to_bin/1Convert a hexadecimal string to a binary().
hexstr_to_int/1Convert a hexadecimal string to an integer.
increment_max_filenum/2Increase the file size of a config file, which is used as the basis for a minimum sequence number.
info_msg/2Log an 'info' level message.
int_to_hexbin/2Convert an integer into a hexadecimal string (in binary() form) whose length is based on I_size.
int_to_hexstr/2Convert an integer into a hexadecimal string whose length is based on I_size.
make_binary/1Convert a compatible Erlang data type into a binary() equivalent.
make_checksum_filename/2Calculate a checksum file path, by common convention.
make_checksum_filename/4Calculate a checksum file path, by common convention.
make_config_filename/2Calculate a config file path, by common convention.
make_data_filename/2Calculate a file data file path, by common convention.
make_data_filename/4Calculate a file data file path, by common convention.
make_projection_filename/2Calculate a projection store file path, by common convention.
make_regname/1Create a registered name atom for FLU sequencer internal rendezvous/message passing use.
make_string/1Convert a compatible Erlang data type into a string() equivalent.
read_max_filenum/2Read the file size of a config file, which is used as the basis for a minimum sequence number.
verb/1Log a verbose message.
verb/2Log a verbose message.

Function Details

bin_to_hexstr/1

bin_to_hexstr(X1::binary()) -> string()

Convert a binary() to a hexadecimal string.

checksum_chunk/1

checksum_chunk(Chunk::binary() | iolist()) -> binary()

Calculate a checksum for a chunk of file data.

connect/2

connect(Host::inet:ip_address() | inet:hostname(), Port::inet:port_number()) -> port()

Create a TCP connection to a remote Machi server.

connect/3

connect(Host::inet:ip_address() | inet:hostname(), Port::inet:port_number(), Timeout::timeout()) -> port()

Create a TCP connection to a remote Machi server.

hexstr_to_bin/1

hexstr_to_bin(S::string() | binary()) -> binary()

Convert a hexadecimal string to a binary().

hexstr_to_int/1

hexstr_to_int(X::string() | binary()) -> non_neg_integer()

Convert a hexadecimal string to an integer.

increment_max_filenum/2

increment_max_filenum(DataDir::string(), Prefix::string()) -> ok | {error, term()}

Increase the file size of a config file, which is used as the basis for a minimum sequence number.

info_msg/2

info_msg(Fmt::string(), Args::list()) -> term()

Log an 'info' level message.

int_to_hexbin/2

int_to_hexbin(I::non_neg_integer(), I_size::non_neg_integer()) -> binary()

Convert an integer into a hexadecimal string (in binary() form) whose length is based on I_size.

int_to_hexstr/2

int_to_hexstr(I::non_neg_integer(), I_size::non_neg_integer()) -> string()

Convert an integer into a hexadecimal string whose length is based on I_size.

make_binary/1

make_binary(X::binary() | iolist()) -> binary()

Convert a compatible Erlang data type into a binary() equivalent.

make_checksum_filename/2

make_checksum_filename(DataDir::string(), FileName::[] | string() | binary()) -> string()

Calculate a checksum file path, by common convention.

make_checksum_filename/4

make_checksum_filename(DataDir::string(), Prefix::string(), SequencerName::atom() | string() | binary(), FileNum::integer()) -> string()

Calculate a checksum file path, by common convention.

make_config_filename/2

make_config_filename(DataDir::string(), Prefix::string()) -> string()

Calculate a config file path, by common convention.

make_data_filename/2

make_data_filename(DataDir::string(), File::[] | string() | binary()) -> {binary(), string()}

Calculate a file data file path, by common convention.

make_data_filename/4

make_data_filename(DataDir::string(), Prefix::string(), SequencerName::atom() | string() | binary(), FileNum::integer()) -> {binary(), string()}

Calculate a file data file path, by common convention.

make_projection_filename/2

make_projection_filename(DataDir::string(), File::[] | string()) -> string()

Calculate a projection store file path, by common convention.

make_regname/1

make_regname(Prefix::binary() | list()) -> atom()

Create a registered name atom for FLU sequencer internal rendezvous/message passing use.

make_string/1

make_string(X::binary() | iolist()) -> string()

Convert a compatible Erlang data type into a string() equivalent.

read_max_filenum/2

read_max_filenum(DataDir::string(), Prefix::string()) -> non_neg_integer()

Read the file size of a config file, which is used as the basis for a minimum sequence number.

verb/1

verb(Fmt::string()) -> term()

Log a verbose message.

verb/2

verb(Fmt::string(), Args::list()) -> term()

Log a verbose message.


Generated by EDoc, May 20 2015, 12:58:33.