mirror of
https://github.com/valitydev/machinery-erlang.git
synced 2024-11-06 08:45:19 +00:00
032b66457e
* Add erlfmt * Apply erlfmt * Update build-utils * Fix module names in elvis config
30 lines
473 B
Erlang
30 lines
473 B
Erlang
-module(ct_sup).
|
|
|
|
-export([start/0]).
|
|
-export([stop/1]).
|
|
|
|
%%
|
|
|
|
-behaviour(supervisor).
|
|
|
|
-export([init/1]).
|
|
|
|
%%
|
|
|
|
-spec start() -> pid().
|
|
start() ->
|
|
{ok, PID} = supervisor:start_link(?MODULE, []),
|
|
true = unlink(PID),
|
|
PID.
|
|
|
|
-spec stop(pid()) -> ok.
|
|
stop(PID) ->
|
|
true = exit(PID, kill),
|
|
ok.
|
|
|
|
%%
|
|
|
|
-spec init([]) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
|
|
init([]) ->
|
|
{ok, {#{strategy => one_for_all, intensity => 1, period => 1}, []}}.
|