Is it possible in Elixir to start supervisors dynamically using :simple_one_to_one strategy, using Supervisor.start_child, or it's limited for GenServer workers ? If yes, let me ask you an example, many thanks.elixir
It is possible. Supervisors don't care if their children are workers or other supervisors. There is an example of using
:simple_one_for_one strategy on the elixir lang page.
The only difference is that in the child specification instead of:
worker(KV.Bucket, , restart: :temporary)
You would use something like: