Skip to content

Instantly share code, notes, and snippets.

@Laymer
Created May 30, 2018 19:35
Show Gist options
  • Save Laymer/258ad5aedb076eb59e089b5ceb7f380a to your computer and use it in GitHub Desktop.
Save Laymer/258ad5aedb076eb59e089b5ceb7f380a to your computer and use it in GitHub Desktop.
Erlang Supervisor Child Specs
child_spec() = #{id => child_id(), % mandatory
start => mfargs(), % mandatory
restart => restart(), % optional
shutdown => shutdown(), % optional
type => worker(), % optional
modules => modules()} % optional
child_id() = term()
mfargs() = {M :: module(), F :: atom(), A :: [term()]}
modules() = [module()] | dynamic
restart() = permanent | transient | temporary
shutdown() = brutal_kill | timeout()
worker() = worker | supervisor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment