This commit is contained in:
hhh
2025-01-04 11:54:01 +02:00
commit c5ce21f5fa
11 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
from neko_run_controller_std.neko.types import LogsHandler
from typing import Type
import dataclasses
from neko_run_controller_std.neko.interfaces import RunControllerHandlersInterface
@dataclasses.dataclass
class __HiddenStorage:
logs_handlers: list[Type[LogsHandler]] = dataclasses.field(default_factory=list)
_storage = __HiddenStorage()
class RRunControllerHandlersInterface(RunControllerHandlersInterface):
@staticmethod
def add_logs_handler(handler: Type[LogsHandler]):
_storage.logs_handlers.append(handler)
RunControllerHandlersInterface = RRunControllerHandlersInterface
__all__ = [RunControllerHandlersInterface]