Reactor.Process.Step.StartLink (reactor_process v0.4.2)

View Source

A Reactor step which starts a process via it's child spec and links it to the process which is running the Reactor.

Warning

If you are building your Reactor directly (rather than via the DSL) then this step must be added with the async?: false option otherwise the step will fail.

The child_spec argument expects a t:Supervisor.module_spec(). The step will then use the start MFA returned by the module's child_spec/1 function to start the child process.

Arguments

  • :child_spec - Required. The child spec

Options

  • :fail_on_already_started? (boolean/0) - Whether the step should fail if the start function returns an already started error The default value is true.

  • :fail_on_ignore? (boolean/0) - Whether the step should fail if the start function returns :ignore The default value is true.

  • :terminate_on_undo? (boolean/0) - Whether to terminate the started process when the Reactor is undoing changes The default value is true.

  • :termination_reason (term/0) - The reason to give to the process when terminating it The default value is :kill.

  • :termination_timeout (timeout/0) - How long to wait for a process to terminate The default value is 5000.