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
//! NoETL Control Plane Library
//!
//! This crate provides the control plane server for NoETL, handling:
//!
//! - **Workflow Orchestration**: Execute playbooks and manage workflow state
//! - **Catalog Management**: Register and retrieve playbooks, tools, and resources
//! - **Credential Management**: Securely store and retrieve encrypted credentials
//! - **Event Processing**: Handle worker events and drive workflow execution
//! - **Execution Management**: Track and manage playbook executions
//!
//! ## Architecture
//!
//! The control plane follows an event-sourcing architecture where all state
//! is derived from events stored in PostgreSQL. NATS JetStream is used for
//! command notifications to workers.
//!
//! ## Modules
//!
//! - [`config`]: Configuration loading from environment variables
//! - [`db`]: Database connectivity and models
//! - [`error`]: Custom error types with Axum integration
//! - [`handlers`]: HTTP route handlers
//! - [`state`]: Shared application state
//!
//! ## Example
//!
//! ```ignore
//! use noetl_control_plane::{
//! config::{AppConfig, DatabaseConfig},
//! db::create_pool,
//! state::AppState,
//! };
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let app_config = AppConfig::from_env()?;
//! let db_config = DatabaseConfig::from_env()?;
//! let db_pool = create_pool(&db_config).await?;
//! let state = AppState::new(db_pool, app_config, None);
//! // ... build and run server
//! Ok(())
//! }
//! ```
pub use ;
pub use ResultExt;