diff --git a/lib/poa_agent/plugins/collector.ex b/lib/poa_agent/plugins/collector.ex index 8565e27..38c332e 100644 --- a/lib/poa_agent/plugins/collector.ex +++ b/lib/poa_agent/plugins/collector.ex @@ -49,6 +49,8 @@ defmodule POAAgent.Plugins.Collector do {:my_collector, [:my_transfer]} ] + ## Implementing A Collector Plugin + In order to implement your Collector Plugin you must implement 3 functions. - `init_collector/1`: Called only once when the process starts @@ -93,7 +95,7 @@ defmodule POAAgent.Plugins.Collector do @doc """ In this callback is where the metrics collection logic must be placed. It must return `{:transfer, data, state}` where `data` is the retrieved metrics or - `{:notransfer, state} when for some reason we don't want to send data to the transfer int + `{:notransfer, state}` when for some reason we don't want to send data to the transfer int that moment """ @callback collect(state :: any()) :: {:transfer, data :: any(), state :: any()} @@ -179,4 +181,4 @@ defmodule POAAgent.Plugins.Collector do end end -end \ No newline at end of file +end diff --git a/lib/poa_agent/plugins/transfer.ex b/lib/poa_agent/plugins/transfer.ex index 1b343c8..2c609d0 100644 --- a/lib/poa_agent/plugins/transfer.ex +++ b/lib/poa_agent/plugins/transfer.ex @@ -29,6 +29,8 @@ defmodule POAAgent.Plugins.Transfer do - `module`: Module which implements the Transfer behaviour - `args`: Initial args which will be passed to the `init_transfer/1` function + ## Implementing A Transfer Plugin + In order to implement your Transfer Plugin you must implement 3 functions. - `init_transfer/1`: Called only once when the process starts