1 % collectd - bindings/erlang/collectd.erl
2 % Copyright (C) 2009 Florian octo Forster
4 % This program is free software; you can redistribute it and/or modify it
5 % under the terms of the GNU General Public License as published by the
6 % Free Software Foundation; only version 2 of the License is applicable.
8 % This program is distributed in the hope that it will be useful, but
9 % WITHOUT ANY WARRANTY; without even the implied warranty of
10 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 % General Public License for more details.
13 % You should have received a copy of the GNU General Public License along
14 % with this program; if not, write to the Free Software Foundation, Inc.,
15 % 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 % Florian octo Forster <octo at verplant.org>
21 -export([dispatch_values/1, register_read/1]).
23 -include("collectd.hrl").
25 dispatch_values (#value_list{} = VL) ->
26 call_cnode (dispatch_values, VL).
28 register_read (Callback) ->
29 call_cnode (register_read, Callback).
31 call_cnode(Func, Args) ->
32 {any, 'collectd@leeloo.lan.home.verplant.org'} ! {Func, Args},
35 io:format ("Function ~w failed: ~s~n", [Func, Message]),