Expand description
Registry for asset signals and their computation dependencies.
This module provides a registry system for managing asset signals and their computational relationships. It defines data structures and validation logic to ensure that signal computations can be performed correctly.
The module provides:
- The
Registrystruct which stores signal definitions and their relationships - Type-level states (
ValidandInvalid) to represent validation status - Validation logic to ensure the registry is consistent and free of cycles
- Serialization and deserialization support for registry persistence
§Registry Structure
The registry is a collection of Signals, each identified by a unique ID. Signals can
depend on other signals for their computation, forming a directed graph. The validation
process ensures this graph is acyclic and all dependencies exist.
§Module Organization
The registry module is organized into several submodules:
signal- Defines the structure of signals and their componentssource- Defines data sources for signalsprocessor- Defines how to process source data into a signal valuepost_processor- Defines transformations applied after initial processing
§Type States
The registry uses type states to distinguish between validated and unvalidated registries:
Registry<Invalid>- A registry that has not been validated or has failed validationRegistry<Valid>- A registry that has been successfully validated and is cycle free
This pattern ensures at compile time that only valid registries can be used in contexts where a valid registry is required.
Modules§
- post_
processor - Post-processing transformations for signal values.
- processor
- Processing strategies for combining source data into signal values.
- signal
- This module provides the core structure for defining signals in the registry system. A signal represents a specific asset or data point that can be computed from various sources, processed according to a defined strategy, and optionally transformed through post-processing steps.
- source
- This module provides structures for defining data sources and routing operations that transform source data before it is processed. It enables the flexible combination and transformation of data from various sources.
Structs§
- Invalid
- Marker type representing an unvalidated registry state.
- Registry
- A collection of signals with their computational dependencies.
- Valid
- Marker type representing a validated registry state.
Enums§
- Validation
Error - Errors returned during the signal validation process.