Hephaestus.Instances (hephaestus v0.3.1)

Copy Markdown View Source

Auto-discovery registry for Hephaestus runtime instances.

Allows workflow facade functions to find the Hephaestus module without explicit configuration. Uses Elixir's Registry for process-based registration with automatic cleanup on termination.

Usage

The registry is started automatically by Hephaestus.Application. Each use Hephaestus module registers itself via Hephaestus.Instances.Tracker on boot.

Workflow facades call lookup!/0 to discover the registered module:

Hephaestus.Instances.lookup!()
#=> MyApp.Hephaestus

When multiple instances are registered, lookup!/0 raises with instructions to pass hephaestus: MyApp.Hephaestus in the workflow's use options.

Summary

Functions

child_spec(arg)

lookup!()

register(hephaestus_module)