kopia lustrzana https://github.com/Yakifo/amqtt
rename entry_points
rodzic
e1c73fc53a
commit
1d100e5c45
|
@ -148,7 +148,7 @@ class Broker:
|
||||||
|
|
||||||
:param config: Example Yaml config
|
:param config: Example Yaml config
|
||||||
:param loop: asyncio loop to use. Defaults to ``asyncio.get_event_loop()``.
|
:param loop: asyncio loop to use. Defaults to ``asyncio.get_event_loop()``.
|
||||||
:param plugin_namespace: Plugin namespace to use when loading plugin entry_points. Defaults to ``hbmqtt.broker.plugins``
|
:param plugin_namespace: Plugin namespace to use when loading plugin entry_points. Defaults to ``amqtt.broker.plugins``
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ class Broker:
|
||||||
if plugin_namespace:
|
if plugin_namespace:
|
||||||
namespace = plugin_namespace
|
namespace = plugin_namespace
|
||||||
else:
|
else:
|
||||||
namespace = "hbmqtt.broker.plugins"
|
namespace = "amqtt.broker.plugins"
|
||||||
self.plugins_manager = PluginManager(namespace, context, self._loop)
|
self.plugins_manager = PluginManager(namespace, context, self._loop)
|
||||||
|
|
||||||
def _build_listeners_config(self, broker_config):
|
def _build_listeners_config(self, broker_config):
|
||||||
|
|
|
@ -124,7 +124,7 @@ class MQTTClient:
|
||||||
context = ClientContext()
|
context = ClientContext()
|
||||||
context.config = self.config
|
context.config = self.config
|
||||||
self.plugins_manager = PluginManager(
|
self.plugins_manager = PluginManager(
|
||||||
"hbmqtt.client.plugins", context, loop=self._loop
|
"amqtt.client.plugins", context, loop=self._loop
|
||||||
)
|
)
|
||||||
self.client_tasks = deque()
|
self.client_tasks = deque()
|
||||||
|
|
||||||
|
|
|
@ -96,14 +96,14 @@ The ``listeners`` section allows to define network listeners which must be start
|
||||||
|
|
||||||
The ``auth`` section setup authentication behaviour:
|
The ``auth`` section setup authentication behaviour:
|
||||||
|
|
||||||
* ``plugins``: defines the list of activated plugins. Note the plugins must be defined in the ``hbmqtt.broker.plugins`` `entry point <https://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins>`_.
|
* ``plugins``: defines the list of activated plugins. Note the plugins must be defined in the ``amqtt.broker.plugins`` `entry point <https://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins>`_.
|
||||||
* ``allow-anonymous`` : used by the internal :class:`hbmqtt.plugins.authentication.AnonymousAuthPlugin` plugin. This parameter enables (``on``) or disable anonymous connection, ie. connection without username.
|
* ``allow-anonymous`` : used by the internal :class:`hbmqtt.plugins.authentication.AnonymousAuthPlugin` plugin. This parameter enables (``on``) or disable anonymous connection, ie. connection without username.
|
||||||
* ``password-file`` : used by the internal :class:`hbmqtt.plugins.authentication.FileAuthPlugin` plugin. This parameter gives to path of the password file to load for authenticating users.
|
* ``password-file`` : used by the internal :class:`hbmqtt.plugins.authentication.FileAuthPlugin` plugin. This parameter gives to path of the password file to load for authenticating users.
|
||||||
|
|
||||||
The ``topic-check`` section setup access control policies for publishing and subscribing to topics:
|
The ``topic-check`` section setup access control policies for publishing and subscribing to topics:
|
||||||
|
|
||||||
* ``enabled``: set to true if you want to impose an access control policy. Otherwise, set it to false.
|
* ``enabled``: set to true if you want to impose an access control policy. Otherwise, set it to false.
|
||||||
* ``plugins``: defines the list of activated plugins. Note the plugins must be defined in the ``hbmqtt.broker.plugins`` `entry point <https://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins>`_.
|
* ``plugins``: defines the list of activated plugins. Note the plugins must be defined in the ``amqtt.broker.plugins`` `entry point <https://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins>`_.
|
||||||
* additional parameters: depending on the plugin used for access control, additional parameters should be added.
|
* additional parameters: depending on the plugin used for access control, additional parameters should be added.
|
||||||
* In case of ``topic_acl`` plugin, the Access Control List (ACL) must be defined in the parameter ``acl``.
|
* In case of ``topic_acl`` plugin, the Access Control List (ACL) must be defined in the parameter ``acl``.
|
||||||
* For each username, a list with the allowed topics must be defined.
|
* For each username, a list with the allowed topics must be defined.
|
||||||
|
|
|
@ -42,28 +42,29 @@ black = "^20.8b1"
|
||||||
flake8 = "^3.9.0"
|
flake8 = "^3.9.0"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
hbmqtt = 'hbmqtt.scripts.broker_script:main'
|
hbmqtt = 'amqtt.scripts.broker_script:main'
|
||||||
hbmqtt_pub = 'hbmqtt.scripts.pub_script:main'
|
hbmqtt_pub = 'amqtt.scripts.pub_script:main'
|
||||||
hbmqtt_sub = 'hbmqtt.scripts.sub_script:main'
|
hbmqtt_sub = 'amqtt.scripts.sub_script:main'
|
||||||
|
|
||||||
[tool.poetry.plugins]
|
[tool.poetry.plugins]
|
||||||
|
|
||||||
[tool.poetry.plugins."hbmqtt.test.plugins"]
|
[tool.poetry.plugins."amqtt.test.plugins"]
|
||||||
"test_plugin" = "tests.plugins.test_manager:EmptyTestPlugin"
|
"test_plugin" = "tests.plugins.test_manager:EmptyTestPlugin"
|
||||||
"event_plugin" = "tests.plugins.test_manager:EventTestPlugin"
|
"event_plugin" = "tests.plugins.test_manager:EventTestPlugin"
|
||||||
"packet_logger_plugin" = "hbmqtt.plugins.logging:PacketLoggerPlugin"
|
"packet_logger_plugin" = "amqtt.plugins.logging:PacketLoggerPlugin"
|
||||||
|
|
||||||
[tool.poetry.plugins."hbmqtt.broker.plugins"]
|
[tool.poetry.plugins."amqtt.broker.plugins"]
|
||||||
"event_logger_plugin" = "hbmqtt.plugins.logging:EventLoggerPlugin"
|
"event_logger_plugin" = "amqtt.plugins.logging:EventLoggerPlugin"
|
||||||
"packet_logger_plugin" = "hbmqtt.plugins.logging:PacketLoggerPlugin"
|
"packet_logger_plugin" = "amqtt.plugins.logging:PacketLoggerPlugin"
|
||||||
"auth_anonymous" = "hbmqtt.plugins.authentication:AnonymousAuthPlugin"
|
"auth_anonymous" = "amqtt.plugins.authentication:AnonymousAuthPlugin"
|
||||||
"auth_file" = "hbmqtt.plugins.authentication:FileAuthPlugin"
|
"auth_file" = "amqtt.plugins.authentication:FileAuthPlugin"
|
||||||
"topic_taboo" = "hbmqtt.plugins.topic_checking:TopicTabooPlugin"
|
"topic_taboo" = "amqtt.plugins.topic_checking:TopicTabooPlugin"
|
||||||
"topic_acl" = "hbmqtt.plugins.topic_checking:TopicAccessControlListPlugin"
|
"topic_acl" = "amqtt.plugins.topic_checking:TopicAccessControlListPlugin"
|
||||||
"broker_sys" = "hbmqtt.plugins.sys.broker:BrokerSysPlugin"
|
"broker_sys" = "amqtt.plugins.sys.broker:BrokerSysPlugin"
|
||||||
|
|
||||||
[tool.poetry.plugins."hbmqtt.client.plugins"]
|
|
||||||
"packet_logger_plugin" = "hbmqtt.plugins.logging:PacketLoggerPlugin"
|
[tool.poetry.plugins."amqtt.client.plugins"]
|
||||||
|
"packet_logger_plugin" = "amqtt.plugins.logging:PacketLoggerPlugin"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|
Ładowanie…
Reference in New Issue