AshScenario.Scenario.Registry (ash_scenario v0.6.0)

View Source

Registry for tracking prototypes across resource modules and resolving cross-prototype references.

Summary

Functions

Returns a specification to start this module under a supervisor.

Clear all registered prototypes (useful for tests).

Get a prototype by reference (resource_module, prototype_name).

Get all prototypes for a resource module.

Register prototypes from a resource module.

Resolve prototype dependencies and return execution order.

Types

prototype_data()

@type prototype_data() :: %{
  ref: atom(),
  resource: module(),
  attributes: map(),
  dependencies: [prototype_ref()]
}

prototype_ref()

@type prototype_ref() :: {module(), atom()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear_all()

Clear all registered prototypes (useful for tests).

get_prototype(arg)

Get a prototype by reference (resource_module, prototype_name).

get_prototypes(resource_module)

Get all prototypes for a resource module.

register_prototypes(resource_module)

Register prototypes from a resource module.

resolve_dependencies(refs)

Resolve prototype dependencies and return execution order.

start_link(opts \\ [])