[#28] Introduce heading for documentation on writing collectors & transfers
There is documentation for both collectors and transfers: all this does is making it easier to navigate to the section on writing either. It was already easy to navigate to the "Plugin" pages.
This commit is contained in:
parent
aa4c3afadd
commit
a0a2f2231d
|
@ -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
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue