ConnectorService
This class provides a service interface for initializing and running a gRPC server with integrated Prometheus monitoring. It manages the environment configuration by ensuring the current working directory is in the system path and supports configurable worker processes, timeouts, and module loading.
Methods
run()
@classmethod
def run(
port: int,
prometheus_port: int,
worker: int,
timeout: int | None,
modules: List[str]| None
) - > None
Starts the gRPC server and Prometheus metrics exporter after ensuring the current working directory is in the system path.
Parameters
| Name | Type | Description |
|---|---|---|
| port | int | The network port number on which the gRPC server will listen for incoming requests. |
| prometheus_port | int | The network port number dedicated to exposing Prometheus-formatted telemetry and metrics. |
| worker | int | The number of worker processes or threads to spawn for handling concurrent requests. |
| timeout | `int | None` |
| modules | `List[str] | None` |
Returns
| Type | Description |
|---|---|
None | Nothing is returned as this method starts a long-running server process. |