asobi_extension_watch (asobi v0.75.1)

View Source

Says which extension went dark.

An extension that exhausts its own restart budget is not restarted (see asobi_extension_sup), so the node keeps serving with one feature missing. Without this the only trace is an OTP supervisor report, and "a feature stopped working and nothing said so" is the failure mode the whole tree exists to make legible.

It monitors rather than links: a monitor cannot influence what it watches.

Summary

Types

state()

-type state() :: #{names := [asobi_extension:name()], monitors := #{reference() => atom()}}.

Functions

handle_call(Request, From, State)

-spec handle_call(term(), gen_server:from(), state()) -> {reply, ok, state()}.

handle_cast(Request, State)

-spec handle_cast(term(), state()) -> {noreply, state()}.

handle_continue/2

-spec handle_continue(monitor, state()) -> {noreply, state()}.

handle_info/2

-spec handle_info(term(), state()) -> {noreply, state()}.

init(Names)

-spec init([asobi_extension:name()]) -> {ok, state(), {continue, monitor}}.

start_link(Names)

-spec start_link([asobi_extension:name()]) -> {ok, pid()} | {error, term()}.