Implement initial structure for data ingestion with Kafka and OPC UA integration - Added DataManager for Kafka message handling - Introduced IngestorManager to manage data ingestion processes - Created OpcManager for OPC UA client interactions - Developed ResourceManager for Redis-based resource management - Established testing framework with unit tests for DataManager and OpcManager - Configured project settings for Python testing with pytest
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
from logging import Logger
|
|
from typing import Dict, List
|
|
from ingestor.managers.data_manager import DataManager
|
|
from ingestor.managers.opc_manager import OpcManager
|
|
from ingestor.managers.resource_manager import ResourceManager
|
|
|
|
|
|
class IngestorManager():
|
|
def __init__(self,
|
|
kafka_servers: str, redis_host: str, redis_port: int,
|
|
lease_ttl: int, heartbeat_ttl: int, poll_interval: int,
|
|
logger: Logger):
|
|
|
|
self.data_manager = DataManager(kafka_servers, logger)
|
|
self.opc_managers = []
|
|
self.resource_manager = ResourceManager(
|
|
redis_host, redis_port, lease_ttl, heartbeat_ttl, logger
|
|
)
|
|
|
|
def init_ingestor(self):
|
|
pass
|
|
|
|
def declare_active(self):
|
|
pass
|
|
|
|
def get_active_ingestors(self):
|
|
pass
|
|
|
|
def get_slot_leases(self, max_slots: int = 1) -> List[Dict]:
|
|
pass
|
|
|
|
def drop_slot_leases(self, ids: List[str]) -> None:
|
|
pass
|
|
|
|
def subscribe_to_tags(self, tags: List[Dict]) -> None:
|
|
pass
|