docker_image_pusher/
lib.rs

1//! Docker Image Pusher Library
2//!
3//! A library for pushing Docker images to registries
4
5pub mod cli;
6pub mod error;
7pub mod image;
8pub mod logging;
9pub mod registry;
10
11// 核心类型导出
12pub use cli::config::AuthConfig;
13pub use error::{RegistryError, Result};
14pub use logging::Logger;
15pub use registry::{RegistryClient, RegistryClientBuilder};
16
17/// Create upload configuration from CLI arguments
18pub fn create_upload_config_from_args(
19    max_concurrent: usize,
20    timeout: u64,
21    retry_attempts: usize,
22    large_threshold: u64,
23) -> registry::UploadConfig {
24    registry::UploadConfig {
25        max_concurrent,
26        timeout_seconds: timeout,
27        retry_attempts,
28        large_layer_threshold: large_threshold,
29        small_blob_threshold: 1024 * 1024, // 1MB default
30        enable_streaming: true,
31    }
32}