refacto: reorganize POC into clean architecture for modularity
This commit is contained in:
parent
9dd53b1b24
commit
0830c2f182
14 changed files with 194 additions and 104 deletions
10
app/consumer/src/ports/message_broker.py
Normal file
10
app/consumer/src/ports/message_broker.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from typing import Callable
|
||||
|
||||
from entities import UplinkEvent
|
||||
|
||||
class MessageBroker(ABC):
|
||||
@abstractmethod
|
||||
def start(self, on_uplink: Callable[[UplinkEvent], None]) -> None:
|
||||
"""Démarre l'écoute et appelle on_uplink(UplinkEvent) à chaque message"""
|
||||
...
|
||||
Loading…
Add table
Add a link
Reference in a new issue