mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 22:26:38 +00:00
abc26d5c20
docs -> _docs
45 lines
1015 B
Python
45 lines
1015 B
Python
from abc import ABC, abstractmethod
|
|
from typing import AsyncIterator
|
|
|
|
from models.results import FrameResult
|
|
from models.recovery import UserInputRequest
|
|
|
|
|
|
class SSEEventStreamerBase(ABC):
|
|
@abstractmethod
|
|
async def emit_frame_result(
|
|
self, flight_id: str, result: FrameResult
|
|
) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def emit_status_update(
|
|
self, flight_id: str, status: dict
|
|
) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def emit_user_input_request(
|
|
self, flight_id: str, request: UserInputRequest
|
|
) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def emit_error(
|
|
self, flight_id: str, error: str
|
|
) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def subscribe(self, flight_id: str) -> AsyncIterator[dict]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def unsubscribe(self, flight_id: str, subscriber_id: str) -> None:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def get_subscriber_count(self, flight_id: str) -> int:
|
|
pass
|
|
|