mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
introduce --parallel to limit concurrent engine calls
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
053f20edab
commit
a0acc20d88
9 changed files with 51 additions and 6 deletions
|
|
@ -50,6 +50,7 @@ type ServiceProxy struct {
|
|||
EventsFn func(ctx context.Context, project string, options EventsOptions) error
|
||||
PortFn func(ctx context.Context, project string, service string, port uint16, options PortOptions) (string, int, error)
|
||||
ImagesFn func(ctx context.Context, projectName string, options ImagesOptions) ([]ImageSummary, error)
|
||||
MaxConcurrencyFn func(parallel int)
|
||||
interceptors []Interceptor
|
||||
}
|
||||
|
||||
|
|
@ -87,6 +88,7 @@ func (s *ServiceProxy) WithService(service Service) *ServiceProxy {
|
|||
s.EventsFn = service.Events
|
||||
s.PortFn = service.Port
|
||||
s.ImagesFn = service.Images
|
||||
s.MaxConcurrencyFn = service.MaxConcurrency
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
@ -308,3 +310,7 @@ func (s *ServiceProxy) Images(ctx context.Context, project string, options Image
|
|||
}
|
||||
return s.ImagesFn(ctx, project, options)
|
||||
}
|
||||
|
||||
func (s *ServiceProxy) MaxConcurrency(i int) {
|
||||
s.MaxConcurrencyFn(i)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue