feat: wire configured harness execution

This commit is contained in:
kami
2026-07-26 20:06:44 +04:00
parent 5d45351613
commit dc3cebebf8
5 changed files with 71 additions and 3 deletions
+9 -1
View File
@@ -109,7 +109,15 @@ func putID[T any](m map[string]T, id, kind string) error {
func (r Registry) Project(id string) (Project, bool) { p, ok := r.projects[id]; return p, ok }
func (r Registry) Machine(id string) (Machine, bool) { m, ok := r.machines[id]; return m, ok }
func (r Registry) Herdr(id string) (Herdr, bool) { h, ok := r.herdrs[id]; return h, ok }
func (r Registry) Projects() []Project { return projects(r.projects) }
func (r Registry) Herdrs() []Herdr {
out := make([]Herdr, 0, len(r.herdrs))
for _, h := range r.herdrs {
out = append(out, h)
}
sort.Slice(out, func(i, j int) bool { return out[i].ID < out[j].ID })
return out
}
func (r Registry) Projects() []Project { return projects(r.projects) }
func projects(m map[string]Project) []Project {
out := make([]Project, 0, len(m))
for _, v := range m {