feat: refactor to ymsctl & yms-daemon
This commit is contained in:
@@ -20,14 +20,14 @@ func Update(ctx context.Context, socketPath string, service string, inputType st
|
||||
return submit(ctx, socketPath, request, progress)
|
||||
}
|
||||
|
||||
func UpdateContainerImage(ctx context.Context, socketPath string, service string, imageReference string, progress func(daemonapi.Response)) (daemonapi.Response, error) {
|
||||
func UpdateContainerImage(ctx context.Context, socketPath string, service string, imageReference string, startLog bool, progress func(daemonapi.Response)) (daemonapi.Response, error) {
|
||||
if !filepath.IsAbs(socketPath) {
|
||||
return daemonapi.Response{}, errors.New("daemon socket path must be absolute")
|
||||
}
|
||||
if imageReference == "" {
|
||||
return daemonapi.Response{}, errors.New("container image reference is required")
|
||||
}
|
||||
request := daemonapi.Request{Operation: daemonapi.OperationUpdate, Service: service, InputType: daemonapi.InputTypeContainerImage, ImageReference: imageReference}
|
||||
request := daemonapi.Request{Operation: daemonapi.OperationUpdate, Service: service, InputType: daemonapi.InputTypeContainerImage, ImageReference: imageReference, StartLog: startLog}
|
||||
return submit(ctx, socketPath, request, progress)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user