Firebreak.Edge (Firebreak v0.1.0)

Copy Markdown View Source

A coupling edge: a runtime dependency from one module to another that is not expressed by the supervision tree.

These are the edges that make the declared supervision structure a partial picture of the real failure topology. An edge of kind :call is the most dangerous: it is synchronous, so the caller blocks (and can time out / crash) when the callee is unavailable during a restart window.

in_init? marks edges that occur inside a module's init/1 callback. A synchronous in-init edge to a later-started sibling is a boot-order bug: the callee isn't running yet when the caller initialises, so the caller's init blocks or crashes on first boot.

Summary

Types

t()

Internal resolution descriptor captured at parse time, resolved against the global name index in Firebreak.Coupling

Types

kind()

@type kind() :: :call | :cast | :registry | :whereis | :ets | :pubsub | :pg | :send

t()

@type t() :: %Firebreak.Edge{
  file: String.t() | nil,
  from: module(),
  in_init?: boolean(),
  kind: kind(),
  line: non_neg_integer() | nil,
  resolved?: boolean(),
  sync?: boolean(),
  target: target(),
  target_raw: String.t() | nil,
  to: module() | nil
}

target()

@type target() :: {:module, module()} | {:name, term()} | {:unknown, String.t()} | nil

Internal resolution descriptor captured at parse time, resolved against the global name index in Firebreak.Coupling:

  • {:module, mod} — target was a literal module alias
  • {:name, atom} — target was a registered name atom
  • {:unknown, raw}— target couldn't be determined statically