FlyDeploy.BlueGreen.Sentinel
(FlyDeploy v0.4.2)
Copy Markdown
A GenServer injected as the first child in the peer's wrapper supervisor.
OTP shuts down children in reverse order, so the sentinel terminates last
— after all user processes (Endpoint, Counter, PubSub, etc.) have already
run their terminate/2 callbacks and written any handoff state.
Before calling :init.stop(), PeerManager arms the sentinel via :erpc.call.
When armed, terminate/2 runs the before_cutover callback and writes
the result to the parent's handoff ETS at key :__before_cutover_result__.
When NOT armed (normal restarts, crashes), terminate/2 is a no-op.
Summary
Functions
Arms the sentinel with a before_cutover callback. Called via :erpc.call
from PeerManager before :init.stop().
Returns a specification to start this module under a supervisor.
Functions
Arms the sentinel with a before_cutover callback. Called via :erpc.call
from PeerManager before :init.stop().
Returns a specification to start this module under a supervisor.
See Supervisor.