45 lines
1.3 KiB
Rust
45 lines
1.3 KiB
Rust
// file: kb-pipeline/src/plan.rs
|
|
// version: 2
|
|
|
|
//! Pipeline planning primitives.
|
|
|
|
/// Pipeline stage identifier.
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
pub enum PipelineStage {
|
|
/// Ingest raw transactions.
|
|
Ingest,
|
|
/// Extract generic Solana structures.
|
|
Extract,
|
|
/// Build program observations.
|
|
Observe,
|
|
/// Decode protocol events.
|
|
Decode,
|
|
/// Materialize business events.
|
|
Materialize,
|
|
/// Aggregate materialized events.
|
|
Aggregate,
|
|
/// Validate outputs.
|
|
Validate,
|
|
}
|
|
|
|
/// Replay selection scope.
|
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
|
pub struct ReplayScope {
|
|
/// Optional module name.
|
|
pub module_name: std::option::Option<std::string::String>,
|
|
/// Optional module version.
|
|
pub module_version: std::option::Option<std::string::String>,
|
|
/// Optional program id.
|
|
pub program_id: std::option::Option<std::string::String>,
|
|
/// Optional surface code.
|
|
pub surface_code: std::option::Option<std::string::String>,
|
|
/// Optional 8-byte discriminator in hexadecimal.
|
|
pub discriminator_8: std::option::Option<std::string::String>,
|
|
/// Optional inclusive start slot.
|
|
pub slot_start: std::option::Option<u64>,
|
|
/// Optional inclusive end slot.
|
|
pub slot_end: std::option::Option<u64>,
|
|
/// Whether to ignore existing ledger rows.
|
|
pub force: bool,
|
|
}
|