pi-agent: Implement progressive Target detection

This commit is contained in:
proxyctl coordinator
2026-07-17 21:01:35 +08:00
parent fbb81ffb40
commit ad651402fd
15 changed files with 558 additions and 31 deletions
+5
View File
@@ -183,6 +183,11 @@ func (a *Adapter) detect(ctx context.Context) (target.Availability, error) {
return target.Availability{Available: true, Evidence: "Docker daemon service is loaded and managed by systemd at " + values["FragmentPath"]}, nil
}
func (a *Adapter) Detect(ctx context.Context, active *profile.Profile) target.Detection {
availability, err := a.detect(ctx)
return target.Detection{Availability: availability, Inspection: a.Inspect(ctx, active), Err: err}
}
func parseProperties(output string) map[string]string {
result := map[string]string{}
for _, line := range strings.Split(output, "\n") {