feat: backend native executor implement

This commit is contained in:
2026-08-16 01:27:30 +08:00
parent fbce91d797
commit 390e0565d3
44 changed files with 6430 additions and 31 deletions
+24
View File
@@ -0,0 +1,24 @@
// Package systemd defines the exact systemd boundary used by native executors.
package systemd
import (
"context"
"errors"
)
var ErrUnitNotFound = errors.New("systemd unit not found")
// Unit is the systemd state required for idempotent start and stop inspection.
type Unit struct {
Name string
LoadState string
ActiveState string
SubState string
}
// Manager performs direct systemd operations without invoking a shell.
type Manager interface {
Inspect(context.Context, string) (Unit, error)
Start(context.Context, string) error
Stop(context.Context, string) error
}