MishkaInstaller.Event.EventHandler (Mishka installer v0.1.7)

Copy Markdown View Source

Serialises (re)compilation of the per-event plugin modules.

Compile requests are queued and run one at a time so the dynamically generated event modules are never created and destroyed concurrently.

The compiled module is per node (in-memory, not in Mnesia). On boot each node builds its own copy from the replicated table; at runtime a local (re)compile is broadcast cluster-wide so every node rebuilds the affected event from the replicated table — keeping Hook.call/3 consistent across the cluster.

Telemetry

  • [:mishka_installer, :event, :compile] — emitted after an event module is (re)built. Metadata: :event, :result (:ok | :error).
  • [:mishka_installer, :event, :synchronized] — emitted once all events have started after the Mnesia store is ready. Metadata: :node.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

do_clean()

@spec do_clean() :: :ok

do_compile(event, status, queue \\ true)

@spec do_compile(String.t(), atom(), boolean()) :: :ok

get()

@spec get() :: keyword()

start_link(state \\ [])