refactor(session): drop `lookup/1` session API
Due to the fact it's not used for anything right now.
This commit is contained in:
parent
97881ff3ca
commit
ab1c4c4222
|
@ -22,14 +22,10 @@
|
|||
-include("emqx_mqtt.hrl").
|
||||
|
||||
%% Session API
|
||||
-export([
|
||||
lookup/1,
|
||||
destroy/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
create/3,
|
||||
open/2
|
||||
open/2,
|
||||
destroy/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
|
@ -106,10 +102,6 @@ create(#{clientid := ClientID}, _ConnInfo, Conf) ->
|
|||
open(#{clientid := ClientID}, _ConnInfo) ->
|
||||
open_session(ClientID).
|
||||
|
||||
-spec lookup(emqx_types:clientinfo()) -> none.
|
||||
lookup(_ClientInfo) ->
|
||||
'TODO'.
|
||||
|
||||
-spec destroy(session() | clientinfo()) -> ok.
|
||||
destroy(#{clientid := ClientID}) ->
|
||||
emqx_ds:session_drop(ClientID).
|
||||
|
|
|
@ -57,11 +57,7 @@
|
|||
-export([
|
||||
create/2,
|
||||
open/2,
|
||||
destroy/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
lookup/2,
|
||||
destroy/1,
|
||||
destroy/2
|
||||
]).
|
||||
|
||||
|
@ -145,8 +141,8 @@
|
|||
}.
|
||||
|
||||
-type t() ::
|
||||
emqx_session_mem:t()
|
||||
| emqx_session_ds:t().
|
||||
emqx_session_mem:session()
|
||||
| emqx_persistent_session_ds:session().
|
||||
|
||||
-define(INFO_KEYS, [
|
||||
id,
|
||||
|
@ -198,10 +194,6 @@ get_mqtt_conf(Zone, Key) ->
|
|||
%% Existing sessions
|
||||
%% -------------------------------------------------------------------
|
||||
|
||||
-spec lookup(clientinfo(), conninfo()) -> t() | none.
|
||||
lookup(ClientInfo, ConnInfo) ->
|
||||
(choose_impl_mod(ConnInfo)):lookup(ClientInfo).
|
||||
|
||||
-spec destroy(clientinfo(), conninfo()) -> ok.
|
||||
destroy(ClientInfo, ConnInfo) ->
|
||||
(choose_impl_mod(ConnInfo)):destroy(ClientInfo).
|
||||
|
|
|
@ -55,14 +55,10 @@
|
|||
-compile(nowarn_export_all).
|
||||
-endif.
|
||||
|
||||
-export([
|
||||
lookup/1,
|
||||
destroy/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
create/3,
|
||||
open/2
|
||||
open/2,
|
||||
destroy/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
|
@ -185,12 +181,6 @@ get_mqtt_conf(Zone, Key) ->
|
|||
get_mqtt_conf(Zone, Key, Default) ->
|
||||
emqx_config:get_zone_conf(Zone, [mqtt, Key], Default).
|
||||
|
||||
-spec lookup(emqx_types:clientinfo()) -> none.
|
||||
lookup(_ClientInfo) ->
|
||||
% NOTE
|
||||
% This is a stub. This session impl has no backing store, thus always `none`.
|
||||
none.
|
||||
|
||||
-spec destroy(session() | clientinfo()) -> ok.
|
||||
destroy(_Session) ->
|
||||
% NOTE
|
||||
|
|
Loading…
Reference in New Issue