mirror of
https://github.com/microsoft/autogen.git
synced 2025-10-01 19:16:50 +00:00

* Added Runtime Factory to support multiple implementations * Rename to ComponentEnsemble to ZMQRuntime * rename zmq_runtime * rename zmq_runtime * pre-commit fixes * pre-commit fix * pre-commit fixes and default runtime * pre-commit fixes * Rename constants * Rename Constants --------- Co-authored-by: Li Jiang <bnujli@gmail.com>
37 lines
744 B
Python
37 lines
744 B
Python
from abc import ABC, abstractmethod
|
|
from typing import List
|
|
|
|
from .Actor import Actor
|
|
from .ActorConnector import ActorConnector
|
|
from .proto.CAP_pb2 import ActorInfo
|
|
|
|
|
|
class IRuntime(ABC):
|
|
@abstractmethod
|
|
def register(self, actor: Actor):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def connect(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def disconnect(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def find_by_topic(self, topic: str) -> ActorConnector:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def find_by_name(self, name: str) -> ActorConnector:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def find_termination(self) -> ActorConnector:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def find_by_name_regex(self, name_regex) -> List[ActorInfo]:
|
|
pass
|