Skip to main content

ConnectorService

This class provides an interface for running a gRPC server. It allows starting the server with configurable options including network port, Prometheus metrics port, worker count, timeout, and loaded modules.

Methods​


run()​

@syncify
@classmethod
async def run(cls, port: int, prometheus_port: int, worker: int, timeout: int | None, modules: List[str] | None): ...

Starts the gRPC connector server and Prometheus metrics endpoint after ensuring the current working directory is present in the system path.

Parameters​

NameTypeDescription
portintThe network port number on which the gRPC server will listen for incoming requests
prometheus_portintThe network port number used to expose Prometheus metrics
workerintThe number of worker threads or processes to allocate for handling server tasks
timeout`intNone`
modules`List[str]None`

Returns​

TypeDescription
NoneNone.