perl plugin, Collectd.pm: Added support for filter chains.
authorSebastian Harl <sh@tokkee.org>
Mon, 16 Feb 2009 13:59:57 +0000 (14:59 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 16 Feb 2009 14:22:05 +0000 (15:22 +0100)
commit923e44fa60c4bb7dab572e6a24b2942a2d6fe899
treed9a88ecf256f70734b50cc0326c5c15b30365607
parent90760db56fa3fe54e1aa99d7c6914b544b1bf16d
perl plugin, Collectd.pm: Added support for filter chains.

fc_register() may now be used to register matches and targets with collectd.
The function takes three arguments: type, name, proc. 'type' has to be any of
FC_MATCH or FC_TARGET, 'name' specifies the name of the target / match and
'proc' is a hash of callbacks (specified by name just like any other
callbacks). There are three types of callbacks: create, destroy and match /
invoke - the former two being optional.

The match / invoke callback has to return any of the following statuses:
FC_MATCH_NO_MATCH, FC_MATCH_MATCHES, FC_TARGET_CONTINUE, FC_TARGET_STOP or
FC_TARGET_RETURN. If none of those constants are used, the behavior is
undefined.
bindings/perl/Collectd.pm
src/perl.c