dirigent-block-queues 0.17.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ """The queue block family: producing to and consuming from Kafka and RabbitMQ."""
2
+
3
+ from dirigent_block_queues.kafka import KafkaConnectionKind, KafkaConsumeSensor, KafkaProduceOperator
4
+ from dirigent_block_queues.rabbitmq import RabbitConnectionKind, RabbitConsumeSensor, RabbitPublishOperator
5
+ from dirigent_plugin import Contribution, extension
6
+
7
+
8
+ class QueuesBlocks:
9
+ """The plugin object the host discovers under the dirigent.plugins.v1 entry-point group."""
10
+
11
+ @extension
12
+ def contribute(self) -> Contribution:
13
+ """Contribute both brokers' blocks and the connection kinds they are addressed through."""
14
+ return Contribution(
15
+ operators=[KafkaProduceOperator(), RabbitPublishOperator()],
16
+ sensors=[KafkaConsumeSensor(), RabbitConsumeSensor()],
17
+ connection_kinds=[KafkaConnectionKind(), RabbitConnectionKind()],
18
+ )
19
+
20
+
21
+ plugin = QueuesBlocks()
22
+
23
+ __all__ = [
24
+ "KafkaConnectionKind",
25
+ "KafkaConsumeSensor",
26
+ "KafkaProduceOperator",
27
+ "QueuesBlocks",
28
+ "RabbitConnectionKind",
29
+ "RabbitConsumeSensor",
30
+ "RabbitPublishOperator",
31
+ "plugin",
32
+ ]