-module(kv_sup). -behaviour(supervisor). -export([start_link/0]). %%% supervisor callbacks -export([init/1]). %%% public api start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). %%% supervisor callbacks init([]) -> SupFlags = #{ strategy => one_for_all, intensity => 0, period => 1 }, ChildSpecs = [ #{id => vnode_manager, start => {kv_vnode_manager, start_link, []}, type => worker}, #{id => vnode_sup, start => {kv_vnode_sup, start_link, []}, type => supervisor} ], {ok, {SupFlags, ChildSpecs}}. %%% internal functions