Skip to main content

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​

NameTypeDescription
portintThe network port number on which the gRPC server will listen for incoming requests.
prometheus_portintThe network port number dedicated to exposing Prometheus-formatted telemetry and metrics.
workerintThe number of worker processes or threads to spawn for handling concurrent requests.
timeout`intNone`
modules`List[str]None`

Returns​

TypeDescription
NoneNothing is returned as this method starts a long-running server process.