feat: refactor to ymsctl & yms-daemon

This commit is contained in:
2026-08-17 02:10:10 +08:00
parent 7755da72e7
commit 79f18fcdea
23 changed files with 394 additions and 47 deletions
+2 -2
View File
@@ -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)
}