Module egtm_config

EGTM Configuration Manager.


EGTM Configuration Manager. EGTM configuration is loaded from file that may look like this one:

  %% egtm core setup
  {egtm, [
    %% Defaults
    {defaults, [
      %% $Piece default delimiter
      {piece_delim, "|"}
    %% Mode of operation
    %%   single (= use NIF directly),
    %%   pool (= use multiple slave ErlVMs)
    %% NOTE: pooling is 10times slower than 'single'
    %% and is also disabled by default. To enable it,
    %% you need to define EGTM_POOL_ENABLED macro
    {mode, single},
    %% Workers are slave ErlVMs with GT.M call-in NIF
    {workers, [
      %% Slave nodes to be autostarted
      {nodes, [egtm1, egtm2, egtm3, egtm4]}
    %% Functions that are for some (security) reason denied
    %{deny, [kill, do, call, merge, xecute]}
    {deny, []}
    %% String encoder/decoder functions
    %{string_conversion, [
    %  {encode, {egtm_string, erl2utf} },
    %  {decode, {egtm_string, utf2erl} } ]}
  %% egtm metrics: histograms and counters
  %% NOTE: if enabled, all egtm-core operations are slower!
  {egtm_metrics, [{enabled, false}]}.

Function Index

param/1Get a config value from priv/egtm.conf.

Function Details


param(Path::list()) -> Result::any()

Get a config value from priv/egtm.conf. Example:

  egtm_config:param ([egtm, workers, nodes])
...will return [a,b,c,d] from config file like this:
     {egtm, [{workers, [{nodes, [a,b,c,d]}]}]}

Generated by EDoc, Aug 19 2012, 02:27:27.