summaryrefslogtreecommitdiff
path: root/deps/amqp10_client/src/amqp10_client_app.erl
blob: 7b5271335bfc4af5c93911e621c5436d61c30fa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2020 VMware, Inc. or its affiliates.  All rights reserved.
%%

-module(amqp10_client_app).

-behaviour(application).

%% Application callbacks
-export([start/2,
         stop/1]).

-type start_type() :: (
        normal |
        {takeover, Node :: node()} |
        {failover, Node :: node()}
       ).
-type state() :: term().

%%====================================================================
%% API
%%====================================================================

-spec start(StartType :: start_type(), StartArgs :: term()) ->
    {ok, Pid :: pid()} | {ok, Pid :: pid(), State :: state()} | {error, Reason :: term()}.
start(_Type, _Args) ->
    amqp10_client_sup:start_link().

-spec stop(State :: state()) -> ok.
stop(_State) ->
    ok.

%%====================================================================
%% Internal functions
%%====================================================================