kafka_dae_diagnostics.config

Utilities for reading Diagnostics IOC configuration from TOML.

Members

DiagnosticsConfig

Create a new model by parsing and validating input data from keyword arguments.

load_config

Validate and load a config file at the specified path.

class kafka_dae_diagnostics.config.DiagnosticsConfig(*, pv_prefix: str, callback_frequency_ms: Annotated[float, Gt(gt=0)], runinfo_topic: str, events_topic: str, kafka_runinfo_consumer: dict[str, str], kafka_events_consumer: dict[str, str])[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

callback_frequency_ms: Annotated[float, Gt(gt=0)]

How often (milliseconds) to update EPICS PVs.

events_topic: str

Kafka topic on which to listen for event messages.

kafka_events_consumer: dict[str, str]

Kafka settings for event stream consumer.

kafka_runinfo_consumer: dict[str, str]

Kafka settings for runInfo stream consumer.

pv_prefix: str

PV prefix of all PVs on this IOC.

runinfo_topic: str

Kafka topic on which to listen for runInfo messages.

kafka_dae_diagnostics.config.load_config(config_path: str) DiagnosticsConfig[source]

Validate and load a config file at the specified path.