Packages

OPCUA Erlang library

Current section

Files

Jump to
opcua src opcua_client_sup.erl
Raw

src/opcua_client_sup.erl

-module(opcua_client_sup).
-behaviour(supervisor).
%%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% API Functions
-export([start_link/0]).
%% Behaviour supervisor callback functions
-export([init/1]).
%%% API FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
%%% BEHAVIOUR supervisor CALLBACK FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init([]) ->
{ok, {#{strategy => one_for_all}, [
supervisor(opcua_client_pool_sup, [])
]}}.
%%% INTERNAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
supervisor(Module, Args) ->
#{id => Module, type => supervisor, start => {Module, start_link, Args}}.