Module Trading_engine.Boundary_effects

Minimal effect dispatcher for deterministic boundary failure injection.

type stage =
  1. | Artifact_create
  2. | Artifact_write
  3. | Artifact_flush
  4. | Artifact_sync_file
  5. | Artifact_close
  6. | Artifact_publish
  7. | Artifact_rename
  8. | Artifact_cleanup
  9. | Artifact_restore
  10. | Artifact_sync_directory
  11. | Process_spawn
  12. | Process_exchange
  13. | Process_terminate
  14. | Process_reap
type operation =
  1. | Create_artifact of string
  2. | Write_artifact of {
    1. channel : Stdlib.out_channel;
    2. contents : string;
    }
  3. | Flush_artifact
  4. | Sync_artifact of Stdlib.out_channel
  5. | Close_artifact
  6. | Publish_artifact of {
    1. partial_path : string;
    2. final_path : string;
    }
  7. | Rename_artifact of {
    1. source_path : string;
    2. target_path : string;
    }
  8. | Cleanup_artifact of string
  9. | Restore_artifact of {
    1. final_path : string;
    2. partial_path : string;
    }
  10. | Sync_directory of string
  11. | Spawn_process
  12. | Exchange_process
  13. | Terminate_process
  14. | Reap_process
type t = {
  1. perform : 'a. operation -> (unit -> 'a) -> 'a;
}
val direct : t
val perform : t -> operation -> (unit -> 'a) -> 'a
val stage : operation -> stage
val stage_to_string : stage -> string