AshScenario.Scenario.Executor behaviour (ash_scenario v0.6.0)
View SourceShared execution logic for creating resources from prototypes.
This module contains the common execution logic used by both Runner (database persistence) and StructBuilder (struct creation without persistence). It uses a strategy pattern to delegate the actual resource creation to different implementations.
Summary
Callbacks
Defines the behaviour that execution strategies must implement.
Functions
Execute all prototypes defined for a resource module.
Execute a list of prototypes using the specified strategy.
Execute a single prototype and return the created resource.
Callbacks
Functions
Execute all prototypes defined for a resource module.
Execute a list of prototypes using the specified strategy.
Parameters
prototype_refs- List of prototype references to executeopts- Options for executionstrategy- Module implementing the execution strategy behaviour
Returns
{:ok, map()}- Map of created resources keyed by {module, ref}{:error, reason}- Error if execution fails
Execute a single prototype and return the created resource.