remotes/ctr: allow to limit max concurrent uploads like downloads
Also add flags for push/pull subcommand to limit max concurrent uploads/downloads. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -228,6 +228,14 @@ func WithMaxConcurrentDownloads(max int) RemoteOpt {
|
||||
}
|
||||
}
|
||||
|
||||
// WithMaxConcurrentUploadedLayers sets max concurrent uploaded layer limit.
|
||||
func WithMaxConcurrentUploadedLayers(max int) RemoteOpt {
|
||||
return func(client *Client, c *RemoteContext) error {
|
||||
c.MaxConcurrentUploadedLayers = max
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithAllMetadata downloads all manifests and known-configuration files
|
||||
func WithAllMetadata() RemoteOpt {
|
||||
return func(_ *Client, c *RemoteContext) error {
|
||||
|
Reference in New Issue
Block a user