mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
20 lines
404 B
Python
20 lines
404 B
Python
|
from abc import ABC, abstractmethod
|
||
|
from app.log import LOG
|
||
|
from app.models import SyncEvent
|
||
|
|
||
|
|
||
|
class EventSink(ABC):
|
||
|
@abstractmethod
|
||
|
def process(self, event: SyncEvent):
|
||
|
pass
|
||
|
|
||
|
|
||
|
class HttpEventSink(EventSink):
|
||
|
def process(self, event: SyncEvent):
|
||
|
pass
|
||
|
|
||
|
|
||
|
class ConsoleEventSink(EventSink):
|
||
|
def process(self, event: SyncEvent):
|
||
|
LOG.info(f"Handling event {event.id}")
|