./ct_report/coverage/mod_aws_sns.COVER.html

1 %%%-------------------------------------------------------------------
2 %%% @author Rafal Slota
3 %%% @copyright (C) 2017 Erlang Solutions Ltd.
4 %%% This software is released under the Apache License, Version 2.0
5 %%% cited in 'LICENSE.txt'.
6 %%% @end
7 %%%-------------------------------------------------------------------
8 %%% @doc
9 %%% Amazon SNS notifications. This module gathers all message send by users and all presence
10 %%% changes and publishes those events to AWS SNS.
11 %%% @end
12 %%%-------------------------------------------------------------------
13 -module(mod_aws_sns).
14 -author("Rafal Slota").
15
16 -include("mongoose.hrl").
17
18 -behavior(gen_mod).
19
20 %% MIM module callbacks
21 -export([deps/2, start/2, stop/1]).
22
23 %%%===================================================================
24 %%% API functions
25 %%%===================================================================
26
27 deps(_Host, Opts) ->
28 10 [{mod_event_pusher, [{backends, [{sns, Opts}]}], hard}].
29
30 -spec start(Host :: jid:server(), Opts :: proplists:proplist()) -> any().
31 start(_Host, _Opts) ->
32 2 Text = <<"mod_aws_sns is deprecated and will be removed in the future.~n"
33 "Please use mod_event_pusher with sns backend.~n"
34 "Refer to mod_event_pusher documentation for more information.">>,
35 2 ?LOG_WARNING(#{what => module_deprecated, text => Text}).
36
37 -spec stop(Host :: jid:server()) -> ok.
38 stop(_Host) ->
39 2 ok.
Line Hits Source