DataLogger.Destination.Controller (data_logger v0.4.0) View Source

A worker process, created and supervised per destination and per topic/sub-destination.

The first time DataLogger.log/2 is called with a given topic DataLogger.Destination.Controllers for this topic for every configured destination are created. They are supervised by a new supervisor, created for the given topic.

A DataLogger.Destination.Controller process is registered in a pub-sub registry with its topic, so when data is sent to the topic, every such process is notified and data is casted to it in the form of {:log_data, topic, data}.

If the destination of a DataLogger.Destination.Controller is configured with send_async: true, the process will be creating a task per cast and will be responsible for invoking the on_error/4/on_success/4 callbacks of the destination when the task finishes. It will also react when the task is :DOWN.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.