orangeqs.juice.schemas.identifiers#
Schemas for identifier events.
Module Contents#
Classes#
Event representing a new identifier. |
|
Configuration for identifiers per service. |
API#
- class orangeqs.juice.schemas.identifiers.Identifier(/, **data: Any)#
Bases:
orangeqs.juice.messaging.EventEvent representing a new identifier.
- class orangeqs.juice.schemas.identifiers.IdentifiersConfig(/, **data: Any)#
Bases:
orangeqs.juice.settings.ConfigurableConfiguration for identifiers per service.
This configuration maps service names to the identifier prefixes they should use for tagging measurements and events. Each prefix is associated with a source service that manages the generation of new identifiers with that prefix. If the source service is the same as the service name, then the service manages its own identifiers with that prefix. Otherwise, the service relies on the source service to generate new identifiers.
See
orangeqs.juice.identifiersfor more details on how to use identifiers in Juice services.- services: dict[str, dict[str, str]]#
None
Mapping of service names to their identifiers.
The inner dictionary maps identifier prefixes to their source. The source indicates the service that manages the generation of new identifiers with that prefix. If the source is the same as the service name, then the service manages its own identifiers with that prefix.
Note that multiple services can manage identifiers with the same prefix!
An example configuration:
# Identifiers for the system-monitor service. [services.system-monitor] # The `cycle` identifier is managed by this service itself. cycle = "system-monitor" # Identifiers for the device service. [services.device] # The `run` identifier is managed by this service itself. run = "device" # The `cycle` identifier is managed by the system-monitor service. cycle = "system-monitor"
See the
orangeqs.juice.identifiersdocumentation for an advanced example.