feat: control systemd Docker daemon target

This commit is contained in:
proxyctl coordinator
2026-07-17 03:24:52 +08:00
parent 3003450dce
commit be3bbbbe04
11 changed files with 919 additions and 25 deletions
+7 -3
View File
@@ -44,9 +44,10 @@ type Snapshot struct {
}
type Result struct {
Snapshot Snapshot
Notice string
Err error
Snapshot Snapshot
Notice string
Confirmation string
Err error
}
type Module interface {
@@ -159,6 +160,9 @@ func (a *Application) setTargetDesired(intent Intent) Result {
if intent.Enabled && active == nil {
return Result{Snapshot: a.Snapshot(), Err: errors.New("no Active Profile; open Profile management before enabling a Target")}
}
if warning := selected.Confirmation(intent.Enabled); warning != "" && !intent.Confirm {
return Result{Snapshot: a.Snapshot(), Confirmation: warning}
}
result := selected.SetDesired(context.Background(), intent.Enabled, active)
a.inspections[selected.ID()] = result.Inspection
notice := ""