refactor(hstreamdb): HStreamDB bridge to its own application
This commit is contained in:
parent
ab809c8b85
commit
d31a305bcb
|
@ -0,0 +1,11 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{erl_opts, [debug_info]}.
|
||||
{deps, [
|
||||
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.5"}}},
|
||||
{emqx, {path, "../../apps/emqx"}},
|
||||
{emqx_utils, {path, "../../apps/emqx_utils"}}
|
||||
]}.
|
||||
|
||||
{shell, [
|
||||
{apps, [emqx_bridge_hstreamdb]}
|
||||
]}.
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_hstreamdb, [
|
||||
{description, "EMQX Enterprise HStreamDB Bridge"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{env, []},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_ee_bridge_hstreamdb).
|
||||
-module(emqx_bridge_hstreamdb).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
@ -66,7 +66,7 @@ fields("get") ->
|
|||
|
||||
field(connector) ->
|
||||
mk(
|
||||
hoconsc:union([binary(), ref(emqx_ee_connector_hstreamdb, config)]),
|
||||
hoconsc:union([binary(), ref(emqx_bridge_hstreamdb_connector, config)]),
|
||||
#{
|
||||
required => true,
|
||||
example => <<"hstreamdb:demo">>,
|
|
@ -1,7 +1,7 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_ee_connector_hstreamdb).
|
||||
-module(emqx_bridge_hstreamdb_connector).
|
||||
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("typerefl/include/types.hrl").
|
|
@ -2,7 +2,7 @@
|
|||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(ee_bridge_hstreamdb_SUITE).
|
||||
-module(emqx_bridge_hstreamdb_SUITE).
|
||||
|
||||
-compile(nowarn_export_all).
|
||||
-compile(export_all).
|
|
@ -2,7 +2,7 @@
|
|||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_ee_connector_hstreamdb_SUITE).
|
||||
-module(emqx_connector_hstreamdb_SUITE).
|
||||
|
||||
-compile(nowarn_export_all).
|
||||
-compile(export_all).
|
|
@ -30,7 +30,7 @@ api_schemas(Method) ->
|
|||
api_ref(emqx_bridge_mongodb, <<"mongodb_rs">>, Method ++ "_rs"),
|
||||
api_ref(emqx_bridge_mongodb, <<"mongodb_sharded">>, Method ++ "_sharded"),
|
||||
api_ref(emqx_bridge_mongodb, <<"mongodb_single">>, Method ++ "_single"),
|
||||
api_ref(emqx_ee_bridge_hstreamdb, <<"hstreamdb">>, Method),
|
||||
api_ref(emqx_bridge_hstreamdb, <<"hstreamdb">>, Method),
|
||||
api_ref(emqx_bridge_influxdb, <<"influxdb_api_v1">>, Method ++ "_api_v1"),
|
||||
api_ref(emqx_bridge_influxdb, <<"influxdb_api_v2">>, Method ++ "_api_v2"),
|
||||
api_ref(emqx_bridge_redis, <<"redis_single">>, Method ++ "_single"),
|
||||
|
@ -54,7 +54,7 @@ schema_modules() ->
|
|||
[
|
||||
emqx_bridge_kafka,
|
||||
emqx_bridge_cassandra,
|
||||
emqx_ee_bridge_hstreamdb,
|
||||
emqx_bridge_hstreamdb,
|
||||
emqx_bridge_gcp_pubsub,
|
||||
emqx_bridge_influxdb,
|
||||
emqx_bridge_mongodb,
|
||||
|
@ -93,7 +93,7 @@ resource_type(kafka_consumer) -> emqx_bridge_kafka_impl_consumer;
|
|||
%% to hocon; keeping this as just `kafka' for backwards compatibility.
|
||||
resource_type(kafka) -> emqx_bridge_kafka_impl_producer;
|
||||
resource_type(cassandra) -> emqx_bridge_cassandra_connector;
|
||||
resource_type(hstreamdb) -> emqx_ee_connector_hstreamdb;
|
||||
resource_type(hstreamdb) -> emqx_bridge_hstreamdb_connector;
|
||||
resource_type(gcp_pubsub) -> emqx_bridge_gcp_pubsub_impl_producer;
|
||||
resource_type(gcp_pubsub_consumer) -> emqx_bridge_gcp_pubsub_impl_consumer;
|
||||
resource_type(mongodb_rs) -> emqx_bridge_mongodb_connector;
|
||||
|
@ -123,7 +123,7 @@ fields(bridges) ->
|
|||
[
|
||||
{hstreamdb,
|
||||
mk(
|
||||
hoconsc:map(name, ref(emqx_ee_bridge_hstreamdb, "config")),
|
||||
hoconsc:map(name, ref(emqx_bridge_hstreamdb, "config")),
|
||||
#{
|
||||
desc => <<"HStreamDB Bridge Config">>,
|
||||
required => false
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{erl_opts, [debug_info]}.
|
||||
{deps, [
|
||||
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.5"}}},
|
||||
{emqx, {path, "../../apps/emqx"}},
|
||||
{emqx_utils, {path, "../../apps/emqx_utils"}}
|
||||
]}.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
emqx_ee_bridge_hstreamdb {
|
||||
emqx_bridge_hstreamdb {
|
||||
|
||||
config_direction.desc:
|
||||
"""The direction of this bridge, MUST be 'egress'"""
|
|
@ -1,4 +1,4 @@
|
|||
emqx_ee_connector_hstreamdb {
|
||||
emqx_bridge_hstreamdb_connector {
|
||||
|
||||
config.desc:
|
||||
"""HStreamDB connection config"""
|
Loading…
Reference in New Issue