1 #include <bindings.dsl.h>
2 #include <HsBaseConfig.h>
3 #include <rrd_client.h>
5 -- |<http://oss.oetiker.ch/rrdtool/doc/librrd.en.html>
7 -- <http://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html>
9 module Bindings.Librrd.Client where
12 #cinline RRDCACHED_DEFAULT_ADDRESS, CString
13 #cinline RRDCACHED_DEFAULT_PORT , CString
14 #cinline ENV_RRDCACHED_ADDRESS , CString
16 #ccall rrdc_connect , CString -> IO CInt
17 #ccall rrdc_is_connected, CString -> IO CInt
18 #ccall rrdc_disconnect , IO CInt
20 #ccall rrdc_update, CString -> CInt -> Ptr CString -> IO CInt
22 #ccall rrdc_flush , CString -> IO CInt
23 -- This one is not exported from the shared library.
24 -- #ccall rrdc_flush_if_daemon, CString -> CString -> IO CInt
26 -- Helper definitions for rrdc_stats_t
27 #num RRDC_STATS_TYPE_GAUGE
28 #num RRDC_STATS_TYPE_COUNTER
30 #starttype struct rrdc_stats_s
33 #union_field value.counter, Word64
34 #union_field value.gauge , CDouble
35 #field next , Ptr <rrdc_stats_s>
37 #synonym_t rrdc_stats_t, <rrdc_stats_s>
39 #ccall rrdc_stats_get , Ptr (Ptr <rrdc_stats_t>) -> IO CInt
40 #ccall rrdc_stats_free, Ptr <rrdc_stats_t> -> IO ()