mod auth;
mod batch;
mod cors;
mod job;
mod metrics;
mod persistence;
mod rate_limit;
mod routes;
mod server;
mod shutdown;
mod websocket;
mod worker;
pub use auth::{ApiKey, AuthConfig, AuthError, AuthManager, AuthResult, AuthStatusResponse, Scope, extract_api_key};
pub use batch::{BatchJob, BatchProgress, BatchQueue, BatchStatus, Priority};
pub use cors::CorsConfig;
pub use job::{ConvertOptions, Job, JobQueue, JobStatus, Progress};
pub use metrics::{BatchStatistics, JobStatistics, MetricsCollector, ServerInfo, StatsResponse, SystemMetrics};
pub use persistence::{HistoryQuery, HistoryResponse, JsonJobStore, JobStore, PersistenceConfig, RecoveryManager, RecoveryResult, RetryResponse, StorageBackend, StoreError};
pub use rate_limit::{RateLimitConfig, RateLimitError, RateLimitResult, RateLimiter, RateLimitStatus};
pub use server::{ServerConfig, WebServer};
pub use shutdown::{ShutdownConfig, ShutdownCoordinator, ShutdownResult, ShutdownSignal, graceful_shutdown, wait_for_shutdown_signal};
pub use websocket::{
generate_preview_base64, preview_stage, WsBroadcaster, WsMessage, PREVIEW_WIDTH,
};
pub use worker::{JobWorker, WorkerPool};
pub const DEFAULT_PORT: u16 = 8080;
pub const DEFAULT_BIND: &str = "127.0.0.1";
pub const DEFAULT_UPLOAD_LIMIT: usize = 500 * 1024 * 1024;
pub const DEFAULT_JOB_TIMEOUT: u64 = 3600;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_default_constants() {
assert_eq!(DEFAULT_PORT, 8080);
assert_eq!(DEFAULT_BIND, "127.0.0.1");
assert_eq!(DEFAULT_UPLOAD_LIMIT, 500 * 1024 * 1024);
assert_eq!(DEFAULT_JOB_TIMEOUT, 3600);
}
}