poa_agent v0.1.0 POAAgent.Plugins.Transfers.WebSocket.Primus View Source

Link to this section Summary

Functions

In this callback is called when a Collector sends data to this Transfer

In this callback is called when the Transfer process receives an erlang message

A callback executed when the Transfer Plugin starts. The argument is retrieved from the configuration file when the Transfer is defined It must return {:ok, state}, that state will be keept as in GenServer and can be retrieved in the data_received/2 function

This callback is called just before the Process goes down. This is a good place for closing connections

Link to this section Functions

Link to this function data_received(label, metric_type, data, state) View Source

In this callback is called when a Collector sends data to this Transfer.

Regarding the parameters, label identifies the Collector, metric_type is the metric type in String format, it is used in order to know which kind of data we are sending, the data is the real data received, and the state is the Collector’s state

It must return {:ok, state}.

Callback implementation for POAAgent.Plugins.Transfer.data_received/4.

Link to this function handle_message(arg1, state) View Source

In this callback is called when the Transfer process receives an erlang message.

It must return {:ok, state}.

Callback implementation for POAAgent.Plugins.Transfer.handle_message/2.

Link to this function init_transfer(configuration) View Source

A callback executed when the Transfer Plugin starts. The argument is retrieved from the configuration file when the Transfer is defined It must return {:ok, state}, that state will be keept as in GenServer and can be retrieved in the data_received/2 function.

Callback implementation for POAAgent.Plugins.Transfer.init_transfer/1.

This callback is called just before the Process goes down. This is a good place for closing connections.

Callback implementation for POAAgent.Plugins.Transfer.terminate/1.