mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
add dry-run flag
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
5a2b7b83cd
commit
fbf845c5f8
6 changed files with 28 additions and 0 deletions
|
|
@ -77,6 +77,8 @@ type Service interface {
|
|||
Images(ctx context.Context, projectName string, options ImagesOptions) ([]ImageSummary, error)
|
||||
// MaxConcurrency defines upper limit for concurrent operations against engine API
|
||||
MaxConcurrency(parallel int)
|
||||
// DryRunMode defines if dry run applies to the command
|
||||
DryRunMode(dryRun bool)
|
||||
// Watch services' development context and sync/notify/rebuild/restart on changes
|
||||
Watch(ctx context.Context, project *types.Project, services []string, options WatchOptions) error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ type ServiceProxy struct {
|
|||
ImagesFn func(ctx context.Context, projectName string, options ImagesOptions) ([]ImageSummary, error)
|
||||
WatchFn func(ctx context.Context, project *types.Project, services []string, options WatchOptions) error
|
||||
MaxConcurrencyFn func(parallel int)
|
||||
DryRunModeFn func(dryRun bool)
|
||||
interceptors []Interceptor
|
||||
}
|
||||
|
||||
|
|
@ -324,3 +325,7 @@ func (s *ServiceProxy) Watch(ctx context.Context, project *types.Project, servic
|
|||
func (s *ServiceProxy) MaxConcurrency(i int) {
|
||||
s.MaxConcurrencyFn(i)
|
||||
}
|
||||
|
||||
func (s *ServiceProxy) DryRunMode(dryRun bool) {
|
||||
s.DryRunModeFn(dryRun)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue