Skip to content

ServiceΒΆ

service ΒΆ

ClassesΒΆ

BlackboardHTTPService ΒΆ

BlackboardHTTPService(orchestrator: Flock)
Source code in src/flock/service.py
def __init__(self, orchestrator: Flock) -> None:
    self.orchestrator = orchestrator
    self.app = FastAPI(title="Blackboard Agents Service", version="1.0.0")
    self._register_routes()
FunctionsΒΆ
run_async async ΒΆ
run_async(host: str = '127.0.0.1', port: int = 8344) -> None

Run the service asynchronously (for use within async context).

Source code in src/flock/service.py
async def run_async(
    self, host: str = "127.0.0.1", port: int = 8344
) -> None:  # pragma: no cover - manual execution
    """Run the service asynchronously (for use within async context)."""
    import uvicorn

    config = uvicorn.Config(self.app, host=host, port=port)
    server = uvicorn.Server(config)
    await server.serve()