refacto: reorganize files to easily add an API service
This commit is contained in:
parent
5c480db410
commit
9c883a8eca
22 changed files with 26 additions and 23 deletions
10
server/app/ports/message_broker.py
Normal file
10
server/app/ports/message_broker.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from typing import Callable
|
||||
|
||||
from domain.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