Skip to main content

Crate credit_data_simulator

Crate credit_data_simulator 

Source
Expand description

§Credit Data Simulator

Multi-service credit data pipeline simulator for testing and benchmarking VIL NDJSON pipeline examples. Also usable as a standalone mock for any credit/banking data integration testing.

§Services

  • CoreBankingSimulator (:18081) — Credit records with NDJSON bulk export, pagination, dirty data ratio
  • MappingServiceSimulator (:18082) — Versioned SLIK field mapping configurations
  • RulepackServiceSimulator (:18083) — Versioned validation rules engine
  • RegulatorEndpointSimulator (:18084) — OJK regulatory submission endpoint

§Usage

use credit_data_simulator::{SimulatorServer, SimulatorConfig};

#[tokio::test]
async fn test_with_simulators() {
    let config = SimulatorConfig::default();
    let server = SimulatorServer::start(config).await.unwrap();
    // Run tests...
    server.shutdown().await;
}

Re-exports§

pub use core_banking::CoreBankingSimulator;
pub use engine::EngineSimulator;
pub use engine::AdminSimulator;
pub use mapping_service::MappingServiceSimulator;
pub use regulator_endpoint::RegulatorEndpointSimulator;
pub use rulepack_service::RulepackServiceSimulator;
pub use config::*;

Modules§

config
Simulator Configuration
core_banking
Core Banking Simulator
engine
Engine Simulator for Paket B Tests
mapping_service
Mapping Service Simulator
models
regulator_endpoint
Regulator Endpoint Simulator
rulepack_service
Rulepack Service Simulator

Structs§

ApiError
API error details
ApiResponse
Standard JSON response wrapper
HealthStatus
Health status of a simulator
ResponseMeta
Response metadata for pagination, timing, etc.
SimulatorEndpoints
Endpoint URLs for all simulators
SimulatorServer
Manages all simulators as a unified server
SimulatorStats
Statistics tracked by simulators

Enums§

SimulatorError
Errors that can occur in simulators

Traits§

Simulator
Trait for all simulators

Functions§

find_available_ports
Find available ports for simulators
shared_state
Create a new shared state
start_all_simulators
Quick start helper for tests - starts all simulators with default config
start_simulators_on_ports
Quick start helper for tests - starts simulators with custom ports

Type Aliases§

SharedState
Thread-safe wrapper for simulator state
SimulatorResult
Result type for simulator operations