event_routing_backends.processors.transformer_utils package#
Subpackages#
Submodules#
event_routing_backends.processors.transformer_utils.exceptions module#
Exceptions related to Caliper transformation
event_routing_backends.processors.transformer_utils.registry module#
Registry to keep track of event transformers
- class event_routing_backends.processors.transformer_utils.registry.TransformerRegistry#
Bases:
object
Registry to keep track of event transformers.
Every Registry that inherits this registry MUST has its own mapping class attribute to avoid conflicts.
- classmethod get_transformer(event)#
Return an initialized transformer instance for the provided event.
- Parameters
event (dict) – event to be transformed
- Returns
Transformer object
- Raises
NoTransformerImplemented – if matching transformer is not found.
- mapping = {}#
- classmethod register(event_key)#
Decorator to register a transformer for an event.
- Parameters
event_key (str) – unique event identifier string.
- classmethod validate_mapping_exists()#
Validate that every registry inheriting this one has its own mapping attribute.
- Raises