View Source EventStreamex.Events.LiveViewMonitor (EventStreamex v1.4.2)
This GenServer will monitor every LiveView of the current node when it use
s EventListener
.
A LiveViewMonitor
is started in each of your nodes.
When a LiveView exits, it will call EventStreamex.EventListener.unsubscribe_all/2
which
will unsubscribe from all channels.
Summary
Functions
Returns a specification to start this module under a supervisor.
Monitors a LiveView given its pid
, its module name and its state (only the subscriptions part).
Updates the state of the liveview specified by pid
.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Monitors a LiveView given its pid
, its module name and its state (only the subscriptions part).
Only call this function when the liveview is connected to the socket
Updates the state of the liveview specified by pid
.
It's important to keep the subscriptions state up to date because it will be need when the process exits