1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Multi-database migration orchestration.
//!
//! Port of `surql/orchestration/` from `oneiriq-surql` (Python). Feature
//! gated behind the `orchestration` cargo feature. Provides the
//! machinery needed to deploy the same migration set to many database
//! instances with a choice of strategies (sequential, parallel,
//! rolling, canary).
//!
//! ## Components
//!
//! - [`EnvironmentConfig`] and [`EnvironmentRegistry`]: describe and
//! register target databases.
//! - [`HealthCheck`] and [`HealthStatus`]: pre-flight reachability and
//! migration-table probes.
//! - [`DeploymentPlan`] and [`MigrationCoordinator`]: bundle the target
//! set, migration list, and runtime knobs; run the chosen strategy.
//! - [`strategies`]: [`DeploymentStrategy`] trait with the concrete
//! [`SequentialStrategy`], [`ParallelStrategy`], [`RollingStrategy`],
//! and [`CanaryStrategy`] implementations.
//! - [`DeploymentResult`] / [`DeploymentStatus`]: per-environment
//! outcome values.
//!
//! ## Examples
//!
//! ```no_run
//! # #[cfg(feature = "orchestration")] {
//! use std::sync::Arc;
//! use surql::connection::ConnectionConfig;
//! use surql::orchestration::{
//! DeploymentPlan, EnvironmentConfig, EnvironmentRegistry, MigrationCoordinator,
//! SequentialStrategy, StrategyKind,
//! };
//!
//! # async fn demo() -> surql::error::Result<()> {
//! let registry = EnvironmentRegistry::new();
//! let connection = ConnectionConfig::builder()
//! .url("ws://localhost:8000")
//! .namespace("prod")
//! .database("main")
//! .build()?;
//! let env = EnvironmentConfig::builder("production", connection).build()?;
//! registry.register(env).await;
//!
//! let coordinator = MigrationCoordinator::new(registry.clone(), Arc::new(SequentialStrategy::new()));
//! let plan = DeploymentPlan::builder(registry)
//! .environment("production")
//! .strategy(StrategyKind::Sequential)
//! .dry_run(true)
//! .verify_health(false)
//! .build();
//! let _results = coordinator.deploy(&plan).await?;
//! # Ok(()) }
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;