v0.1.0-pre.029
This commit is contained in:
7
kb-pipeline/src/constants.rs
Normal file
7
kb-pipeline/src/constants.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
// file: kb-pipeline/src/constants.rs
|
||||
// version: 2
|
||||
|
||||
//! Pipeline constants.
|
||||
|
||||
/// Canonical tracing target for pipeline orchestration.
|
||||
pub(crate) const TRACING_TARGET: &str = "kb-pipeline";
|
||||
1845
kb-pipeline/src/core_extraction.rs
Normal file
1845
kb-pipeline/src/core_extraction.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
// file: kb-pipeline/src/lib.rs
|
||||
// version: 1
|
||||
// version: 3
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![deny(unreachable_pub)]
|
||||
@@ -7,7 +7,35 @@
|
||||
|
||||
//! Pipeline orchestration boundary.
|
||||
|
||||
/// Returns the pipeline migration status.
|
||||
pub fn migration_status() -> &'static str {
|
||||
return "scaffolded";
|
||||
}
|
||||
mod constants;
|
||||
mod core_extraction;
|
||||
mod plan;
|
||||
|
||||
/// Canonical tracing target for pipeline orchestration.
|
||||
pub(crate) use self::constants::TRACING_TARGET;
|
||||
/// Stable core extraction processor name.
|
||||
pub use self::core_extraction::CORE_EXTRACTION_PROCESSOR_NAME;
|
||||
/// Stable core extraction processor version.
|
||||
pub use self::core_extraction::CORE_EXTRACTION_PROCESSOR_VERSION;
|
||||
/// Stable core extraction stage code.
|
||||
pub use self::core_extraction::CORE_EXTRACTION_STAGE;
|
||||
/// Observer notified during core extraction campaigns.
|
||||
pub use self::core_extraction::CoreExtractionObserver;
|
||||
/// Progress event emitted by core extraction campaigns.
|
||||
pub use self::core_extraction::CoreExtractionProgressEvent;
|
||||
/// Severity of one core extraction progress event.
|
||||
pub use self::core_extraction::CoreExtractionProgressLevel;
|
||||
/// Bounded core extraction request.
|
||||
pub use self::core_extraction::CoreExtractionRequest;
|
||||
/// Source selection for a core extraction campaign.
|
||||
pub use self::core_extraction::CoreExtractionSource;
|
||||
/// Summary returned by a core extraction campaign.
|
||||
pub use self::core_extraction::CoreExtractionSummary;
|
||||
/// Executes one bounded core extraction campaign.
|
||||
pub use self::core_extraction::execute_core_extraction;
|
||||
/// Extracts one canonical raw transaction into normalized core rows.
|
||||
pub use self::core_extraction::extract_raw_transaction_to_core;
|
||||
/// Pipeline stage identifier.
|
||||
pub use self::plan::PipelineStage;
|
||||
/// Replay selection scope.
|
||||
pub use self::plan::ReplayScope;
|
||||
|
||||
44
kb-pipeline/src/plan.rs
Normal file
44
kb-pipeline/src/plan.rs
Normal file
@@ -0,0 +1,44 @@
|
||||
// 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,
|
||||
}
|
||||
Reference in New Issue
Block a user