package riot
Library
Module
Module type
Parameter
Class
Class type
type strategy =
| One_for_one
(*If one child process terminates and is to be restarted, only that child process is affected. This is the default restart strategy.
*)| One_for_all
(*If one child process terminates and is to be restarted, all other child processes are terminated and then all child processes are restarted.
*)| Rest_for_one
(*If one child process terminates and is to be restarted, the 'rest' of the child processes (that is, the child processes after the terminated child process in the start order) are terminated. Then the terminated child process and all child processes after it are restarted.
*)| Simple_one_for_one
(*A simplified one_for_one supervisor, where all child processes are dynamically added instances of the same process type, that is, running the same code.
*)
val child_spec :
start_link:('state -> (Pid.t, [> `Exit of exn ]) Stdlib.result) ->
'state ->
child_spec
Create a new child specification to be used with start_link
val start_link :
?strategy:strategy ->
?restart_limit:int ->
?restart_period:int ->
child_specs:child_spec list ->
unit ->
(Pid.t, [> `Supervisor_error ]) Stdlib.result
Describe and start a supervisor