compose exec doesn't need project

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-09-22 15:15:33 +02:00 committed by Nicolas De loof
parent 9b055c31fe
commit 244834ff12
4 changed files with 11 additions and 34 deletions

View file

@ -40,7 +40,7 @@ type ServiceProxy struct {
KillFn func(ctx context.Context, project *types.Project, options KillOptions) error
RunOneOffContainerFn func(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
RemoveFn func(ctx context.Context, project *types.Project, options RemoveOptions) error
ExecFn func(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
ExecFn func(ctx context.Context, project string, opts RunOptions) (int, error)
CopyFn func(ctx context.Context, project *types.Project, opts CopyOptions) error
PauseFn func(ctx context.Context, project string, options PauseOptions) error
UnPauseFn func(ctx context.Context, project string, options PauseOptions) error
@ -261,13 +261,10 @@ func (s *ServiceProxy) Remove(ctx context.Context, project *types.Project, optio
}
// Exec implements Service interface
func (s *ServiceProxy) Exec(ctx context.Context, project *types.Project, options RunOptions) (int, error) {
func (s *ServiceProxy) Exec(ctx context.Context, project string, options RunOptions) (int, error) {
if s.ExecFn == nil {
return 0, ErrNotImplemented
}
for _, i := range s.interceptors {
i(ctx, project)
}
return s.ExecFn(ctx, project, options)
}