Copyright © 2014-2016 Takeru Ohta <phjgt308@gmail.com>
Functions for sink processes
A sink process manages the lifetime of a sink and a sink writer instance(logi_sink_writer
).
Sink process is spawned at time a sink is installed in a channel (logi_channel:install_sink/2
).
After spawned, the process should call send_writer_to_parent/1
to
notify available writer instance to the parent.
sink_sup() = pid()
The supervisor of a sink process
recv_writer_from_child/2 | Receives a sink writer instance from the child sink process SinkSup |
send_writer_to_parent/1 | Sends Writer to the parent sink process. |
start_child/1 | Starts a new child sink process. |
stop_child/1 | Stops the sink process. |
recv_writer_from_child(SinkSup::sink_sup(), Timeout::timeout()) -> logi_sink_writer:writer() | undefined
Receives a sink writer instance from the child sink process SinkSup
send_writer_to_parent(Writer::logi_sink_writer:writer() | undefined) -> ok
Sends Writer
to the parent sink process
The message {sink_writer, sink_sup(), Writer}
is sent to the parent.
start_child(Sink::logi_sink:sink()) -> {ok, sink_sup()} | {error, Reason::term()}
Starts a new child sink process
NOTICE: This function can only be invoked in a sink process.stop_child(SinkSup::sink_sup()) -> ok
Stops the sink process
NOTICE: This function can only be invoked in a sink process.Generated by EDoc