pub struct PushArgs {
pub source: String,
pub target: String,
pub username: Option<String>,
pub password: Option<String>,
pub skip_tls: bool,
pub cache_dir: PathBuf,
pub verbose: bool,
pub timeout: u64,
pub max_concurrent: usize,
pub skip_existing: bool,
pub force_upload: bool,
pub dry_run: bool,
}
Expand description
推送镜像的参数
Fields§
§source: String
源镜像 (格式: repository:tag 或 tar 文件路径)
target: String
目标镜像引用 (支持多种格式):
- docker.io/library/ubuntu:latest
- ubuntu:latest (默认使用 docker.io/library)
username: Option<String>
Registry 用户名
password: Option<String>
Registry 密码
skip_tls: bool
跳过 TLS 证书验证
cache_dir: PathBuf
缓存目录 (默认: .cache)
verbose: bool
启用详细输出
timeout: u64
超时时间(秒)
max_concurrent: usize
最大并发上传数 (基础设置,AdaptiveConcurrencyManager 会动态调整)
skip_existing: bool
跳过已存在的层
force_upload: bool
强制上传即使层已存在
dry_run: bool
验证模式(不实际上传)
Implementations§
Source§impl PushArgs
impl PushArgs
Sourcepub fn parse_target(&self) -> Result<ParsedImage>
pub fn parse_target(&self) -> Result<ParsedImage>
解析目标镜像引用
pub fn validate(&self) -> Result<()>
Sourcepub fn is_tar_source(&self) -> bool
pub fn is_tar_source(&self) -> bool
判断source是否为tar文件
Sourcepub fn parse_source_repository(&self) -> Option<(String, String)>
pub fn parse_source_repository(&self) -> Option<(String, String)>
解析source为repository:reference格式
Trait Implementations§
Source§impl Args for PushArgs
impl Args for PushArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl FromArgMatches for PushArgs
impl FromArgMatches for PushArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Auto Trait Implementations§
impl Freeze for PushArgs
impl RefUnwindSafe for PushArgs
impl Send for PushArgs
impl Sync for PushArgs
impl Unpin for PushArgs
impl UnwindSafe for PushArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more