<divclass="summary-synopsis"><p>A callback executed when the Transfer Plugin starts.
The argument is retrieved from the configuration file when the Transfer is defined
It must return <codeclass="inline">{:ok, state}</code>, that <codeclass="inline">state</code> will be keept as in <ahref="https://hexdocs.pm/elixir/GenServer.html"><codeclass="inline">GenServer</code></a> and can be
retrieved in the <codeclass="inline">data_received/2</code> function</p>
</div>
</div>
<divclass="summary-row">
<divclass="summary-signature">
<ahref="#terminate/1">terminate(_)</a>
</div>
<divclass="summary-synopsis"><p>This callback is called just before the Process goes down. This is a good place for closing connections</p>
<p> Regarding the parameters, <codeclass="inline">label</code> identifies the Collector, <codeclass="inline">metric_type</code> is the metric type in String format, it is used in order
to know which kind of data we are sending, the <codeclass="inline">data</code> is the real data received, and the <codeclass="inline">state</code> is the Collector’s state</p>
<p>Callback implementation for <ahref="POAAgent.Plugins.Transfer.html#c:data_received/4"><codeclass="inline">POAAgent.Plugins.Transfer.data_received/4</code></a>.</p>
<p> In this callback is called when the Transfer process receives an erlang message.</p>
<p> It must return <codeclass="inline">{:ok, state}</code>.</p>
<p>Callback implementation for <ahref="POAAgent.Plugins.Transfer.html#c:handle_message/2"><codeclass="inline">POAAgent.Plugins.Transfer.handle_message/2</code></a>.</p>
</section>
</div>
<divclass="detail"id="init_transfer/1">
<divclass="detail-header">
<ahref="#init_transfer/1"class="detail-link"title="Link to this function">
<p> A callback executed when the Transfer Plugin starts.
The argument is retrieved from the configuration file when the Transfer is defined
It must return <codeclass="inline">{:ok, state}</code>, that <codeclass="inline">state</code> will be keept as in <ahref="https://hexdocs.pm/elixir/GenServer.html"><codeclass="inline">GenServer</code></a> and can be
retrieved in the <codeclass="inline">data_received/2</code> function.</p>
<p>Callback implementation for <ahref="POAAgent.Plugins.Transfer.html#c:init_transfer/1"><codeclass="inline">POAAgent.Plugins.Transfer.init_transfer/1</code></a>.</p>
</section>
</div>
<divclass="detail"id="terminate/1">
<divclass="detail-header">
<ahref="#terminate/1"class="detail-link"title="Link to this function">
<p> This callback is called just before the Process goes down. This is a good place for closing connections.</p>
<p>Callback implementation for <ahref="POAAgent.Plugins.Transfer.html#c:terminate/1"><codeclass="inline">POAAgent.Plugins.Transfer.terminate/1</code></a>.</p>