|
@@ -38,7 +38,7 @@ type ServiceProxy struct {
|
|
|
LogsFn func(ctx context.Context, projectName string, consumer LogConsumer, options LogOptions) error
|
|
LogsFn func(ctx context.Context, projectName string, consumer LogConsumer, options LogOptions) error
|
|
|
PsFn func(ctx context.Context, projectName string, options PsOptions) ([]ContainerSummary, error)
|
|
PsFn func(ctx context.Context, projectName string, options PsOptions) ([]ContainerSummary, error)
|
|
|
ListFn func(ctx context.Context, options ListOptions) ([]Stack, error)
|
|
ListFn func(ctx context.Context, options ListOptions) ([]Stack, error)
|
|
|
- ConvertFn func(ctx context.Context, project *types.Project, options ConvertOptions) ([]byte, error)
|
|
|
|
|
|
|
+ ConfigFn func(ctx context.Context, project *types.Project, options ConfigOptions) ([]byte, error)
|
|
|
KillFn func(ctx context.Context, project string, options KillOptions) error
|
|
KillFn func(ctx context.Context, project string, options KillOptions) error
|
|
|
RunOneOffContainerFn func(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
|
|
RunOneOffContainerFn func(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
|
|
|
RemoveFn func(ctx context.Context, project string, options RemoveOptions) error
|
|
RemoveFn func(ctx context.Context, project string, options RemoveOptions) error
|
|
@@ -78,7 +78,7 @@ func (s *ServiceProxy) WithService(service Service) *ServiceProxy {
|
|
|
s.LogsFn = service.Logs
|
|
s.LogsFn = service.Logs
|
|
|
s.PsFn = service.Ps
|
|
s.PsFn = service.Ps
|
|
|
s.ListFn = service.List
|
|
s.ListFn = service.List
|
|
|
- s.ConvertFn = service.Convert
|
|
|
|
|
|
|
+ s.ConfigFn = service.Config
|
|
|
s.KillFn = service.Kill
|
|
s.KillFn = service.Kill
|
|
|
s.RunOneOffContainerFn = service.RunOneOffContainer
|
|
s.RunOneOffContainerFn = service.RunOneOffContainer
|
|
|
s.RemoveFn = service.Remove
|
|
s.RemoveFn = service.Remove
|
|
@@ -214,14 +214,14 @@ func (s *ServiceProxy) List(ctx context.Context, options ListOptions) ([]Stack,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Convert implements Service interface
|
|
// Convert implements Service interface
|
|
|
-func (s *ServiceProxy) Convert(ctx context.Context, project *types.Project, options ConvertOptions) ([]byte, error) {
|
|
|
|
|
- if s.ConvertFn == nil {
|
|
|
|
|
|
|
+func (s *ServiceProxy) Config(ctx context.Context, project *types.Project, options ConfigOptions) ([]byte, error) {
|
|
|
|
|
+ if s.ConfigFn == nil {
|
|
|
return nil, ErrNotImplemented
|
|
return nil, ErrNotImplemented
|
|
|
}
|
|
}
|
|
|
for _, i := range s.interceptors {
|
|
for _, i := range s.interceptors {
|
|
|
i(ctx, project)
|
|
i(ctx, project)
|
|
|
}
|
|
}
|
|
|
- return s.ConvertFn(ctx, project, options)
|
|
|
|
|
|
|
+ return s.ConfigFn(ctx, project, options)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Kill implements Service interface
|
|
// Kill implements Service interface
|