Merge pull request #12727 from kjellwinblad/kjell/emqx_connector_info/EMQX-11427
refactor: add emqx_connector_info behavior
This commit is contained in:
commit
94c6e5bb38
|
@ -91,7 +91,7 @@ hard_coded_action_info_modules_ee() ->
|
|||
emqx_bridge_dynamo_action_info,
|
||||
emqx_bridge_gcp_pubsub_consumer_action_info,
|
||||
emqx_bridge_gcp_pubsub_producer_action_info,
|
||||
emqx_bridge_kafka_action_info,
|
||||
emqx_bridge_kafka_producer_action_info,
|
||||
emqx_bridge_kafka_consumer_action_info,
|
||||
emqx_bridge_kinesis_action_info,
|
||||
emqx_bridge_hstreamdb_action_info,
|
||||
|
|
|
@ -248,16 +248,8 @@ end_per_testcase(_TestCase, Config) ->
|
|||
|
||||
-define(CONNECTOR_IMPL, emqx_bridge_v2_dummy_connector).
|
||||
init_mocks() ->
|
||||
case emqx_release:edition() of
|
||||
ee ->
|
||||
meck:new(emqx_connector_ee_schema, [passthrough, no_link]),
|
||||
meck:expect(emqx_connector_ee_schema, resource_type, 1, ?CONNECTOR_IMPL),
|
||||
ok;
|
||||
ce ->
|
||||
meck:new(emqx_connector_resource, [passthrough, no_link]),
|
||||
meck:expect(emqx_connector_resource, connector_to_resource_type, 1, ?CONNECTOR_IMPL),
|
||||
ok
|
||||
end,
|
||||
meck:new(?CONNECTOR_IMPL, [non_strict, no_link]),
|
||||
meck:expect(?CONNECTOR_IMPL, callback_mode, 0, async_if_possible),
|
||||
meck:expect(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_azure_event_hub, [
|
||||
{description, "EMQX Enterprise Azure Event Hub Bridge"},
|
||||
{vsn, "0.1.6"},
|
||||
{vsn, "0.1.7"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -9,7 +9,10 @@
|
|||
telemetry,
|
||||
wolff
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_azure_event_hub_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_azure_event_hub_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_azure_event_hub_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_azure_event_hub).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -24,9 +24,11 @@ connector_type_name() -> azure_event_hub_producer.
|
|||
schema_module() -> emqx_bridge_azure_event_hub.
|
||||
|
||||
connector_action_config_to_bridge_v1_config(ConnectorConfig, ActionConfig) ->
|
||||
emqx_bridge_kafka_action_info:connector_action_config_to_bridge_v1_config(
|
||||
emqx_bridge_kafka_producer_action_info:connector_action_config_to_bridge_v1_config(
|
||||
ConnectorConfig, ActionConfig
|
||||
).
|
||||
|
||||
bridge_v1_config_to_action_config(BridgeV1Conf, ConnectorName) ->
|
||||
emqx_bridge_kafka_action_info:bridge_v1_config_to_action_config(BridgeV1Conf, ConnectorName).
|
||||
emqx_bridge_kafka_producer_action_info:bridge_v1_config_to_action_config(
|
||||
BridgeV1Conf, ConnectorName
|
||||
).
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% @doc
|
||||
%% Implementation of emqx_connector_info for Azure Event Hub connector.
|
||||
%% This module provides connector-specific information and configurations
|
||||
%% required by the emqx_connector application.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_azure_event_hub_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
%% API exports.
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% API Functions
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
type_name() ->
|
||||
azure_event_hub_producer.
|
||||
|
||||
bridge_types() ->
|
||||
[azure_event_hub_producer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_kafka_impl_producer.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_azure_event_hub.
|
||||
|
||||
config_schema() ->
|
||||
{azure_event_hub_producer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_azure_event_hub, "config_connector")),
|
||||
#{
|
||||
desc => <<"Azure Event Hub Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_azure_event_hub.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_azure_event_hub, <<"azure_event_hub_producer">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
ecql
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_cassandra_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_cassandra_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_cassandra_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_cassandra).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_cassandra_action_info).
|
||||
|
||||
-behaviour(emqx_action_info).
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_cassandra_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
cassandra.
|
||||
|
||||
bridge_types() ->
|
||||
[cassandra].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_cassandra_connector.
|
||||
|
||||
config_schema() ->
|
||||
{cassandra,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_cassandra, "config_connector")),
|
||||
#{
|
||||
desc => <<"Cassandra Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_cassandra.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_cassandra, <<"cassandra">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
clickhouse
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_clickhouse_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_clickhouse_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_clickhouse_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_clickhouse).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_clickhouse_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
clickhouse.
|
||||
|
||||
bridge_types() ->
|
||||
[clickhouse].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_clickhouse_connector.
|
||||
|
||||
config_schema() ->
|
||||
{clickhouse,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_clickhouse, "config_connector")),
|
||||
#{
|
||||
desc => <<"ClickHouse Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_clickhouse.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_clickhouse, <<"clickhouse">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_confluent, [
|
||||
{description, "EMQX Enterprise Confluent Connector and Action"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -9,7 +9,10 @@
|
|||
telemetry,
|
||||
wolff
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_confluent_producer_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_confluent_producer_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_confluent_producer_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_confluent_producer).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_confluent_producer_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
%% API exports.
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% API Functions
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
type_name() ->
|
||||
confluent_producer.
|
||||
|
||||
bridge_types() ->
|
||||
[confluent_producer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_kafka_impl_producer.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_confluent_producer.
|
||||
|
||||
config_schema() ->
|
||||
{confluent_producer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_confluent_producer, "config_connector")),
|
||||
#{
|
||||
desc => <<"Confluent Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_confluent_producer.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_confluent_producer, <<"confluent_producer">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
erlcloud
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_dynamo_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_dynamo_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_dynamo_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_dynamo).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_dynamo_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
dynamo.
|
||||
|
||||
bridge_types() ->
|
||||
[dynamo].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_dynamo_connector.
|
||||
|
||||
config_schema() ->
|
||||
{dynamo,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_dynamo, "config_connector")),
|
||||
#{
|
||||
desc => <<"DynamoDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_dynamo.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_dynamo, <<"dynamo">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,7 +1,7 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_bridge_es, [
|
||||
{description, "EMQX Enterprise Elastic Search Bridge"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{modules, [
|
||||
emqx_bridge_es,
|
||||
emqx_bridge_es_connector
|
||||
|
@ -12,7 +12,10 @@
|
|||
stdlib,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_es_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_es_connector_info]}
|
||||
]},
|
||||
{licenses, ["Business Source License 1.1"]},
|
||||
{maintainers, ["EMQX Team <contact@emqx.io>"]},
|
||||
{links, [
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_es_connector).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-behaviour(emqx_resource).
|
||||
|
||||
-include("emqx_bridge_es.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_es_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
elasticsearch.
|
||||
|
||||
bridge_types() ->
|
||||
[elasticsearch].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_es_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_es_connector.
|
||||
|
||||
config_schema() ->
|
||||
{elasticsearch,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_es_connector, config)),
|
||||
#{
|
||||
desc => <<"ElasticSearch Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_es_connector.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_es_connector, <<"elasticsearch">>, Method
|
||||
).
|
|
@ -12,6 +12,10 @@
|
|||
{emqx_action_info_modules, [
|
||||
emqx_bridge_gcp_pubsub_producer_action_info,
|
||||
emqx_bridge_gcp_pubsub_consumer_action_info
|
||||
]},
|
||||
{emqx_connector_info_modules, [
|
||||
emqx_bridge_gcp_pubsub_producer_connector_info,
|
||||
emqx_bridge_gcp_pubsub_consumer_connector_info
|
||||
]}
|
||||
]},
|
||||
{modules, []},
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_gcp_pubsub_consumer_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
gcp_pubsub_consumer.
|
||||
|
||||
bridge_types() ->
|
||||
[gcp_pubsub_consumer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_gcp_pubsub_impl_consumer.
|
||||
|
||||
config_schema() ->
|
||||
{gcp_pubsub_consumer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(
|
||||
name, hoconsc:ref(emqx_bridge_gcp_pubsub_consumer_schema, "config_connector")
|
||||
),
|
||||
#{
|
||||
desc => <<"GCP PubSub Consumer Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_gcp_pubsub_consumer_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_gcp_pubsub_consumer_schema, <<"gcp_pubsub_consumer">>, Method ++ "_connector"
|
||||
).
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_gcp_pubsub_consumer_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-import(hoconsc, [mk/2, ref/2]).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_gcp_pubsub_producer_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
gcp_pubsub_producer.
|
||||
|
||||
bridge_types() ->
|
||||
[gcp_pubsub, gcp_pubsub_producer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_gcp_pubsub_impl_producer.
|
||||
|
||||
config_schema() ->
|
||||
{gcp_pubsub_producer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(
|
||||
name, hoconsc:ref(emqx_bridge_gcp_pubsub_producer_schema, "config_connector")
|
||||
),
|
||||
#{
|
||||
desc => <<"GCP PubSub Producer Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_gcp_pubsub_producer_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_gcp_pubsub_producer_schema, <<"gcp_pubsub_producer">>, Method ++ "_connector"
|
||||
).
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_gcp_pubsub_producer_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-import(hoconsc, [mk/2, ref/2]).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
greptimedb
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_greptimedb_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_greptimedb_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_greptimedb_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_greptimedb).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("emqx/include/logger.hrl").
|
||||
-include_lib("emqx_connector/include/emqx_connector.hrl").
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_greptimedb_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
greptimedb.
|
||||
|
||||
bridge_types() ->
|
||||
[greptimedb].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_greptimedb_connector.
|
||||
|
||||
config_schema() ->
|
||||
{greptimedb,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_greptimedb, "config_connector")),
|
||||
#{
|
||||
desc => <<"GreptimeDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_greptimedb.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_greptimedb, <<"greptimedb">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
hstreamdb_erl
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_hstreamdb_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_hstreamdb_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_hstreamdb_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_hstreamdb).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include("emqx_bridge_hstreamdb.hrl").
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_hstreamdb_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
hstreamdb.
|
||||
|
||||
bridge_types() ->
|
||||
[hstreamdb].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_hstreamdb_connector.
|
||||
|
||||
config_schema() ->
|
||||
{hstreamdb,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_hstreamdb, "config_connector")),
|
||||
#{
|
||||
desc => <<"HStreamDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_hstreamdb.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_hstreamdb, <<"hstreamdb">>, Method ++ "_connector"
|
||||
).
|
|
@ -3,7 +3,10 @@
|
|||
{vsn, "0.2.4"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_http_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_http_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_http_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%
|
||||
%% Licensed under the Apache License, Version 2.0 (the "License");
|
||||
%% you may not use this file except in compliance with the License.
|
||||
%% You may obtain a copy of the License at
|
||||
%%
|
||||
%% http://www.apache.org/licenses/LICENSE-2.0
|
||||
%%
|
||||
%% Unless required by applicable law or agreed to in writing, software
|
||||
%% distributed under the License is distributed on an "AS IS" BASIS,
|
||||
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
%% See the License for the specific language governing permissions and
|
||||
%% limitations under the License.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_http_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
http.
|
||||
|
||||
bridge_types() ->
|
||||
[webhook, http].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_http_connector.
|
||||
|
||||
config_schema() ->
|
||||
{http,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_http_schema, "config_connector")),
|
||||
#{
|
||||
alias => [webhook],
|
||||
desc => <<"HTTP Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_http_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_http_schema, <<"http">>, Method ++ "_connector"
|
||||
).
|
|
@ -15,6 +15,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_http_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_influxdb, [
|
||||
{description, "EMQX Enterprise InfluxDB Bridge"},
|
||||
{vsn, "0.2.0"},
|
||||
{vsn, "0.2.1"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
influxdb
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_influxdb_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_influxdb_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_influxdb_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_influxdb).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("emqx/include/logger.hrl").
|
||||
-include_lib("emqx_connector/include/emqx_connector.hrl").
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_influxdb_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
influxdb.
|
||||
|
||||
bridge_types() ->
|
||||
[influxdb, influxdb_api_v1, influxdb_api_v2].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_influxdb_connector.
|
||||
|
||||
config_schema() ->
|
||||
{influxdb,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_influxdb, "config_connector")),
|
||||
#{
|
||||
desc => <<"InfluxDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_influxdb.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_influxdb, <<"influxdb">>, Method ++ "_connector"
|
||||
).
|
|
@ -12,7 +12,10 @@
|
|||
stdlib,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_iotdb_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_iotdb_connector_info]}
|
||||
]},
|
||||
{licenses, ["Business Source License 1.1"]},
|
||||
{maintainers, ["EMQX Team <contact@emqx.io>"]},
|
||||
{links, [
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_iotdb_connector).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-behaviour(emqx_resource).
|
||||
|
||||
-include("emqx_bridge_iotdb.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_iotdb_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
iotdb.
|
||||
|
||||
bridge_types() ->
|
||||
[iotdb].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_iotdb_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_iotdb_connector.
|
||||
|
||||
config_schema() ->
|
||||
{iotdb,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_iotdb_connector, config)),
|
||||
#{
|
||||
desc => <<"IoTDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_iotdb_connector.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_iotdb_connector, <<"iotdb">>, Method
|
||||
).
|
|
@ -14,8 +14,12 @@
|
|||
]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [
|
||||
emqx_bridge_kafka_action_info,
|
||||
emqx_bridge_kafka_producer_action_info,
|
||||
emqx_bridge_kafka_consumer_action_info
|
||||
]},
|
||||
{emqx_connector_info_modules, [
|
||||
emqx_bridge_kafka_consumer_connector_info,
|
||||
emqx_bridge_kafka_producer_connector_info
|
||||
]}
|
||||
]},
|
||||
{modules, []},
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_kafka).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_kafka_consumer_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
kafka_consumer.
|
||||
|
||||
bridge_types() ->
|
||||
[kafka_consumer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_kafka_impl_consumer.
|
||||
|
||||
config_schema() ->
|
||||
{kafka_consumer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_kafka_consumer_schema, "config_connector")),
|
||||
#{
|
||||
desc => <<"Kafka Consumer Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_kafka_consumer_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_kafka_consumer_schema, <<"kafka_consumer">>, Method ++ "_connector"
|
||||
).
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_kafka_consumer_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_kafka_action_info).
|
||||
-module(emqx_bridge_kafka_producer_action_info).
|
||||
|
||||
-behaviour(emqx_action_info).
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_kafka_producer_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
kafka_producer.
|
||||
|
||||
bridge_types() ->
|
||||
[kafka, kafka_producer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_kafka_impl_producer.
|
||||
|
||||
config_schema() ->
|
||||
{kafka_producer,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_kafka, "config_connector")),
|
||||
#{
|
||||
desc => <<"Kafka Producer Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_kafka.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_kafka, <<"kafka_producer">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,6 +8,7 @@
|
|||
erlcloud
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_kinesis_action_info]}]},
|
||||
{env, [{emqx_connector_info_modules, [emqx_bridge_kinesis_connector_info]}]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_kinesis).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_kinesis_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
kinesis.
|
||||
|
||||
bridge_types() ->
|
||||
[kinesis, kinesis_producer].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_kinesis_impl_producer.
|
||||
|
||||
config_schema() ->
|
||||
{kinesis,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_kinesis, "config_connector")),
|
||||
#{
|
||||
desc => <<"Kinesis Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_kinesis.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_kinesis, <<"kinesis">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,13 +1,16 @@
|
|||
{application, emqx_bridge_matrix, [
|
||||
{description, "EMQX Enterprise MatrixDB Bridge"},
|
||||
{vsn, "0.1.3"},
|
||||
{vsn, "0.1.4"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_matrix_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_matrix_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_matrix_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_matrix).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
-export([
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_matrix_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
matrix.
|
||||
|
||||
bridge_types() ->
|
||||
[matrix].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_postgresql.
|
||||
|
||||
config_schema() ->
|
||||
{matrix,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_matrix, "config_connector")),
|
||||
#{
|
||||
desc => <<"Matrix Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_matrix.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_matrix, <<"matrix">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
emqx_mongodb
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_mongodb_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_mongodb_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_mongodb_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_mongodb).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_mongodb_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
mongodb.
|
||||
|
||||
bridge_types() ->
|
||||
[mongodb, mongodb_rs, mongodb_sharded, mongodb_single].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_mongodb_connector.
|
||||
|
||||
config_schema() ->
|
||||
{mongodb,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_mongodb, "config_connector")),
|
||||
#{
|
||||
desc => <<"MongoDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_mongodb.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_mongodb, <<"mongodb">>, Method ++ "_connector"
|
||||
).
|
|
@ -10,7 +10,10 @@
|
|||
emqx_resource,
|
||||
emqtt
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_mqtt_pubsub_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_mqtt_pubsub_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{licenses, ["Apache 2.0"]},
|
||||
{links, []}
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
-module(emqx_bridge_mqtt_connector_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx/include/logger.hrl").
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2020-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%
|
||||
%% Licensed under the Apache License, Version 2.0 (the "License");
|
||||
%% you may not use this file except in compliance with the License.
|
||||
%% You may obtain a copy of the License at
|
||||
%%
|
||||
%% http://www.apache.org/licenses/LICENSE-2.0
|
||||
%%
|
||||
%% Unless required by applicable law or agreed to in writing, software
|
||||
%% distributed under the License is distributed on an "AS IS" BASIS,
|
||||
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
%% See the License for the specific language governing permissions and
|
||||
%% limitations under the License.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_mqtt_pubsub_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
mqtt.
|
||||
|
||||
bridge_types() ->
|
||||
[mqtt].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_mqtt_connector.
|
||||
|
||||
config_schema() ->
|
||||
{mqtt,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_mqtt_connector_schema, "config_connector")),
|
||||
#{
|
||||
desc => <<"MQTT Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_mqtt_connector_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_mqtt_connector_schema, <<"mqtt">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_mysql, [
|
||||
{description, "EMQX Enterprise MySQL Bridge"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
emqx_mysql
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_mysql_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_mysql_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_mysql_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_mysql).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_mysql_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
mysql.
|
||||
|
||||
bridge_types() ->
|
||||
[mysql].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_mysql_connector.
|
||||
|
||||
config_schema() ->
|
||||
{mysql,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_mysql, "config_connector")),
|
||||
#{
|
||||
desc => <<"MySQL Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_mysql.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_mysql, <<"mysql">>, Method ++ "_connector"
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
opentsdb
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_opents_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_opents_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
|
||||
{licenses, ["BSL"]},
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_opents_connector).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-behaviour(emqx_resource).
|
||||
|
||||
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_opents_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
opents.
|
||||
|
||||
bridge_types() ->
|
||||
[opents].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_opents_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_opents_connector.
|
||||
|
||||
config_schema() ->
|
||||
{opents,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_opents_connector, "config_connector")),
|
||||
#{
|
||||
desc => <<"OpenTSDB Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_opents_connector.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_opents_connector, <<"opents">>, Method
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
emqx_oracle
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_oracle_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_oracle_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_oracle_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
|
||||
{links, []}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_oracle).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_oracle_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
oracle.
|
||||
|
||||
bridge_types() ->
|
||||
[oracle].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_oracle.
|
||||
|
||||
config_schema() ->
|
||||
{oracle,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_oracle, "config_connector")),
|
||||
#{
|
||||
desc => <<"Oracle Connector Config">>,
|
||||
required => false,
|
||||
validator => fun emqx_bridge_oracle:config_validator/1
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_oracle.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_oracle, <<"oracle">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_pgsql, [
|
||||
{description, "EMQX Enterprise PostgreSQL Bridge"},
|
||||
{vsn, "0.1.5"},
|
||||
{vsn, "0.1.6"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
emqx_postgresql
|
||||
]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_pgsql_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_pgsql_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_pgsql_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_pgsql_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
pgsql.
|
||||
|
||||
bridge_types() ->
|
||||
[pgsql].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_postgresql.
|
||||
|
||||
config_schema() ->
|
||||
{pgsql,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_pgsql, "config_connector")),
|
||||
#{
|
||||
desc => <<"PostgreSQL Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_postgresql_connector_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_postgresql_connector_schema, <<"pgsql">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_pulsar, [
|
||||
{description, "EMQX Pulsar Bridge"},
|
||||
{vsn, "0.2.0"},
|
||||
{vsn, "0.1.9"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -8,7 +8,11 @@
|
|||
emqx_resource,
|
||||
pulsar
|
||||
]},
|
||||
{env, []},
|
||||
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_pulsar_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_pulsar_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
|
||||
{links, []}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_pulsar_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
pulsar.
|
||||
|
||||
bridge_types() ->
|
||||
[pulsar_producer, pulsar].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_pulsar_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_pulsar_connector.
|
||||
|
||||
config_schema() ->
|
||||
{pulsar,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_pulsar_connector_schema, "config_connector")),
|
||||
#{
|
||||
desc => <<"Pulsar Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_pulsar_connector_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_pulsar_connector_schema, <<"pulsar">>, Method
|
||||
).
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_pulsar_connector_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-export([namespace/0, roots/0, fields/1, desc/1]).
|
||||
-export([connector_examples/1, connector_example_values/0]).
|
||||
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
rabbit_common,
|
||||
amqp_client
|
||||
]},
|
||||
{env, []},
|
||||
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_rabbitmq_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_rabbitmq_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_rabbitmq_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
rabbitmq.
|
||||
|
||||
bridge_types() ->
|
||||
[rabbitmq].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_rabbitmq_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_rabbitmq_connector.
|
||||
|
||||
config_schema() ->
|
||||
{rabbitmq,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(
|
||||
name, hoconsc:ref(emqx_bridge_rabbitmq_connector_schema, "config_connector")
|
||||
),
|
||||
#{
|
||||
desc => <<"RabbitMQ Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_rabbitmq_connector_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_rabbitmq_connector_schema, <<"rabbitmq">>, Method
|
||||
).
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
-module(emqx_bridge_rabbitmq_connector_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_redis, [
|
||||
{description, "EMQX Enterprise Redis Bridge"},
|
||||
{vsn, "0.1.5"},
|
||||
{vsn, "0.1.6"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -9,7 +9,8 @@
|
|||
emqx_redis
|
||||
]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_redis_action_info]}
|
||||
{emqx_action_info_modules, [emqx_bridge_redis_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_redis_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_redis_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
redis.
|
||||
|
||||
bridge_types() ->
|
||||
[redis, redis_single, redis_sentinel, redis_cluster].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_redis_connector.
|
||||
|
||||
config_schema() ->
|
||||
{redis,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_redis_schema, "config_connector")),
|
||||
#{
|
||||
desc => <<"Redis Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_redis_schema.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_redis_schema, <<"redis">>, Method ++ "_connector"
|
||||
).
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_redis_schema).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-define(TYPE, redis).
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
{vsn, "0.1.5"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_resource, rocketmq]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_rocketmq_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_rocketmq_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_rocketmq_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_rocketmq).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_rocketmq_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
rocketmq.
|
||||
|
||||
bridge_types() ->
|
||||
[rocketmq].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_rocketmq_connector.
|
||||
|
||||
config_schema() ->
|
||||
{rocketmq,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_rocketmq, "config_connector")),
|
||||
#{
|
||||
desc => <<"RocketMQ Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_rocketmq.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_rocketmq, <<"rocketmq">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_s3, [
|
||||
{description, "EMQX Enterprise S3 Bridge"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -10,7 +10,8 @@
|
|||
emqx_s3
|
||||
]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_s3_action_info]}
|
||||
{emqx_action_info_modules, [emqx_bridge_s3_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_s3_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_s3).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include("emqx_bridge_s3.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_s3_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
s3.
|
||||
|
||||
bridge_types() ->
|
||||
[s3].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_s3_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_s3.
|
||||
|
||||
config_schema() ->
|
||||
{s3,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_s3, "config_connector")),
|
||||
#{
|
||||
desc => <<"S3 Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_s3.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_s3, <<"s3">>, Method ++ "_connector"
|
||||
).
|
|
@ -3,7 +3,10 @@
|
|||
{vsn, "0.1.6"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_resource, odbc]},
|
||||
{env, [{emqx_action_info_modules, [emqx_bridge_sqlserver_action_info]}]},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_sqlserver_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_sqlserver_connector_info]}
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_sqlserver).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_sqlserver_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
sqlserver.
|
||||
|
||||
bridge_types() ->
|
||||
[sqlserver].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_sqlserver_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_sqlserver.
|
||||
|
||||
config_schema() ->
|
||||
{sqlserver,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_sqlserver, "config_connector")),
|
||||
#{
|
||||
desc => <<"Microsoft SQL Server Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_sqlserver.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_sqlserver, <<"sqlserver">>, Method ++ "_connector"
|
||||
).
|
|
@ -1,13 +1,19 @@
|
|||
{application, emqx_bridge_syskeeper, [
|
||||
{description, "EMQX Enterprise Data bridge for Syskeeper"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_syskeeper_action_info]},
|
||||
{emqx_connector_info_modules, [
|
||||
emqx_bridge_syskeeper_connector_info,
|
||||
emqx_bridge_syskeeper_proxy_connector_info
|
||||
]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_syskeeper_connector).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-behaviour(emqx_resource).
|
||||
|
||||
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2023-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_syskeeper_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
syskeeper_forwarder.
|
||||
|
||||
bridge_types() ->
|
||||
[syskeeper_forwarder].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_syskeeper_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_syskeeper_connector.
|
||||
|
||||
config_schema() ->
|
||||
{syskeeper_forwarder,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_syskeeper_connector, config)),
|
||||
#{
|
||||
desc => <<"Syskeeper Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_syskeeper_connector.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_syskeeper_connector, <<"syskeeper_forwarder">>, Method
|
||||
).
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_syskeeper_proxy).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_syskeeper_proxy_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
syskeeper_proxy.
|
||||
|
||||
bridge_types() ->
|
||||
[].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_syskeeper_proxy_server.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_syskeeper_proxy.
|
||||
|
||||
config_schema() ->
|
||||
{syskeeper_proxy,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_syskeeper_proxy, config)),
|
||||
#{
|
||||
desc => <<"Syskeeper Proxy Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_syskeeper_proxy.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_syskeeper_proxy, <<"syskeeper_proxy">>, Method
|
||||
).
|
|
@ -8,7 +8,10 @@
|
|||
emqx_resource,
|
||||
tdengine
|
||||
]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, [emqx_bridge_tdengine_action_info]},
|
||||
{emqx_connector_info_modules, [emqx_bridge_tdengine_connector_info]}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
-module(emqx_bridge_tdengine_connector).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-behaviour(emqx_resource).
|
||||
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_tdengine_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_transform_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
tdengine.
|
||||
|
||||
bridge_types() ->
|
||||
[tdengine].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_bridge_tdengine_connector.
|
||||
|
||||
config_transform_module() ->
|
||||
emqx_bridge_tdengine_connector.
|
||||
|
||||
config_schema() ->
|
||||
{tdengine,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_tdengine_connector, "config_connector")),
|
||||
#{
|
||||
desc => <<"TDengine Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_tdengine_connector.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_tdengine_connector, <<"tdengine">>, Method
|
||||
).
|
|
@ -1,10 +1,12 @@
|
|||
{application, emqx_bridge_timescale, [
|
||||
{description, "EMQX Enterprise TimescaleDB Bridge"},
|
||||
{vsn, "0.1.3"},
|
||||
{vsn, "0.1.4"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_resource]},
|
||||
{env, [{emqx_action_info_module, emqx_bridge_timescale_action_info}]},
|
||||
{env, []},
|
||||
{env, [
|
||||
{emqx_action_info_modules, emqx_bridge_timescale_action_info},
|
||||
{emqx_connector_info_modules, emqx_bridge_timescale_connector_info}
|
||||
]},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
]}.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
%%--------------------------------------------------------------------
|
||||
-module(emqx_bridge_timescale).
|
||||
|
||||
-behaviour(emqx_connector_examples).
|
||||
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
|
||||
-export([
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2024 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
-module(emqx_bridge_timescale_connector_info).
|
||||
|
||||
-behaviour(emqx_connector_info).
|
||||
|
||||
-export([
|
||||
type_name/0,
|
||||
bridge_types/0,
|
||||
resource_callback_module/0,
|
||||
config_schema/0,
|
||||
schema_module/0,
|
||||
api_schema/1
|
||||
]).
|
||||
|
||||
type_name() ->
|
||||
timescale.
|
||||
|
||||
bridge_types() ->
|
||||
[timescale].
|
||||
|
||||
resource_callback_module() ->
|
||||
emqx_postgresql.
|
||||
|
||||
config_schema() ->
|
||||
{timescale,
|
||||
hoconsc:mk(
|
||||
hoconsc:map(name, hoconsc:ref(emqx_bridge_timescale, "config_connector")),
|
||||
#{
|
||||
desc => <<"Timescale Connector Config">>,
|
||||
required => false
|
||||
}
|
||||
)}.
|
||||
|
||||
schema_module() ->
|
||||
emqx_bridge_timescale.
|
||||
|
||||
api_schema(Method) ->
|
||||
emqx_connector_schema:api_ref(
|
||||
emqx_bridge_timescale, <<"timescale">>, Method ++ "_connector"
|
||||
).
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue