Electric.Connection.Supervisor (electric v1.2.4)
View SourceThe main connection supervisor that looks after Connection.Manager.
It starts Connection.Manager.Supervisor which then directly supervises Connection.Manager and ConnectionResolver processes.
Connection.Manager acts a bit like a supervisor for database connection processes:
- it opens database connections in the right order
- restarts them during initialization if they fail for recoverable reasons
- restarts the replication client at any point if it crashes due to a non-fatal error
- coordinates with CoreSupervisor to start the Shapes.Supervisor at the right point in time, passing it the right set of options that have been informed by connection manager's own initialization sequence up to that point
If a database connection shuts down due to a non-recoverable error, the connection manager process will ask this supervisor to shut down, which in the single-tenant mode results in the whole OTP application shutting down.
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for Supervisor.init/1.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for Supervisor.init/1.