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 #ccall rrdc_flush_if_daemon, CString -> CString -> IO CInt
25 -- Helper definitions for rrdc_stats_t
26 #num RRDC_STATS_TYPE_GAUGE
27 #num RRDC_STATS_TYPE_COUNTER
29 #starttype struct rrdc_stats_s
32 #union_field value.counter, Word64
33 #union_field value.gauge , CDouble
34 #field next , Ptr <rrdc_stats_s>
36 #synonym_t rrdc_stats_t, <rrdc_stats_s>
38 #ccall rrdc_stats_get , Ptr (Ptr <rrdc_stats_t>) -> IO CInt
39 #ccall rrdc_stats_free, Ptr <rrdc_stats_t> -> IO ()