Files
mikromon/mikromon/connectors/registry.py
Mateusz Gruszczyński e8f6c4c609 push
2026-03-05 15:53:33 +01:00

14 lines
322 B
Python

from .routeros_rest import RouterOSRestConnector
from .routeros_ssh import RouterOSSshConnector
REGISTRY = {
"rest": RouterOSRestConnector(),
"ssh": RouterOSSshConnector(),
}
def get_connector(name: str):
c = REGISTRY.get(name)
if not c:
raise KeyError(f"Unknown connector: {name}")
return c