refactor: delete non-prod code

So far the retainer backend type is always `built_in_database`.
The slightly over-engineered pre-implementation to support
another backend is likely not going to fly as the EMQX
resource frame work is mostly for auth and data integration.
i.e. not generic enough for retained messages.
This commit is contained in:
Zaiming (Stone) Shi 2024-02-19 14:36:12 +01:00
parent 0fef19f86f
commit ad53523e6b
1 changed files with 1 additions and 11 deletions

View File

@ -425,17 +425,7 @@ get_backend_module() ->
create_resource(Context, #{type := built_in_database} = Cfg) ->
emqx_retainer_mnesia:create_resource(Cfg),
Context;
create_resource(Context, #{type := DB} = Config) ->
ResourceID = erlang:iolist_to_binary([io_lib:format("~ts_~ts", [?APP, DB])]),
_ = emqx_resource:create(
ResourceID,
<<"emqx_retainer">>,
list_to_existing_atom(io_lib:format("~ts_~ts", [emqx_connector, DB])),
Config,
#{}
),
Context#{resource_id => ResourceID}.
Context.
-spec close_resource(context()) -> ok | {error, term()}.
close_resource(#{resource_id := ResourceId}) ->