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
//! # synth-server
//!
//! gRPC and REST server for synthetic data generation.
//!
//! This crate provides a server that exposes the synthetic data generation
//! capabilities via gRPC and REST APIs for integration with other systems.
//!
//! ## Features
//!
//! - **Bulk Generation**: Generate large batches of data synchronously
//! - **Streaming**: Continuous real-time data generation with configurable throughput
//! - **Control**: Pause, resume, and stop generation streams
//! - **Configuration**: Dynamic configuration updates via API
//! - **Metrics**: Real-time generation statistics and health monitoring
//! - **WebSocket**: Real-time metrics and event streaming
//!
//! ## gRPC Usage
//!
//! ```rust,ignore
//! use datasynth_server::{SynthService, SyntheticDataServiceServer};
//! use tonic::transport::Server;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let addr = "[::1]:50051".parse()?;
//! let service = SynthService::new(default_generator_config());
//!
//! Server::builder()
//! .add_service(SyntheticDataServiceServer::new(service))
//! .serve(addr)
//! .await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## REST Usage
//!
//! ```rust,ignore
//! use datasynth_server::{rest, SynthService, grpc::service::default_generator_config};
//! use axum::Router;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let service = SynthService::new(default_generator_config());
//! let router = rest::create_router(service);
//!
//! let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
//! axum::serve(listener, router).await?;
//!
//! Ok(())
//! }
//! ```
pub use ;