logi_ex v0.1.1 Logi.SinkProc
Functions for sink processes.
A sink process manages the lifetime of a sink and a sink writer instance(Logi.SinkWriter
).
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.
If the root sink process exits, the associated sink is uninstalled from the channel.
Summary
Types
The supervisor of a sink process
Functions
Receives a sink writer instance from the child sink process sink_sup
Sends writer
to the parent sink process
Starts a new child sink process
Stops the sink process
Types
Functions
recv_writer_from_child(sink_sup, timeout) :: Logi.SinkWriter.writer | :undefined
Receives a sink writer instance from the child sink process sink_sup
.
Sends writer
to the parent sink process.
The message {:sink_writer, sink_sup, Logi.SinkWriter.writer}
is sent to the parent.
NOTICE: This function can only be invoked in a sink process.
Starts a new child sink process.
NOTICE: This function can only be invoked in a sink process.
Stops the sink process.
NOTICE: This function can only be invoked in a sink process.