Skip to content

Commit

Permalink
Move host_type_or_global() type into mongooseim module
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Nov 5, 2021
1 parent 67712f4 commit e9f93c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/mongoose_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-type function_name() :: atom().
-type main_module() :: module().
-type backend_module() :: module().
-type host_type_or_global() :: host_type_or_global() | global.
-type host_type_or_global() :: mongooseim:host_type_or_global().

-spec init(HostType :: host_type_or_global(),
MainModule :: main_module(),
Expand Down
3 changes: 2 additions & 1 deletion src/mongooseim.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
-module(mongooseim).

-type host_type() :: binary().
-type host_type_or_global() :: host_type() | global.
-type domain_name() :: jid:lserver().
-export_type([host_type/0, domain_name/0]).
-export_type([host_type/0, host_type_or_global/0, domain_name/0]).

%% API
-export([start/0]).
Expand Down
3 changes: 1 addition & 2 deletions src/wpool/mongoose_wpool.erl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

%% Config scope
-type scope() :: global | host | mongooseim:host_type().
-type host_type_or_global() :: mongooseim:host_type() | global.
-type host_type_or_global() :: mongooseim:host_type_or_global().

-type tag() :: atom().
%% Name of a process
Expand Down Expand Up @@ -86,7 +86,6 @@
-export_type([proc_name/0]).
-export_type([pool_opts/0]).
-export_type([conn_opts/0]).
-export_type([host_type_or_global/0]).

-type callback_fun() :: init | start | default_opts | is_supported_strategy | stop.

Expand Down
2 changes: 1 addition & 1 deletion src/wpool/mongoose_wpool_http.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ stop(HostType, Tag) ->

%% --------------------------------------------------------------
%% Other API functions
-spec get_params(HostType :: mongoose_wpool:host_type_or_global(),
-spec get_params(HostType :: mongooseim:host_type_or_global(),
Tag :: mongoose_wpool:tag()) ->
{ok, PathPrefix :: path_prefix(), RequestTimeout :: request_timeout()}
| {error, pool_not_started}.
Expand Down

0 comments on commit e9f93c3

Please sign in to comment.