MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / GetAllInstances

Method GetAllInstances

internal/loop/manager.go:473–495  ·  view source on GitHub ↗

GetAllInstances returns a snapshot of all loop instances.

()

Source from the content-addressed store, hash-verified

471
472// GetAllInstances returns a snapshot of all loop instances.
473func (m *Manager) GetAllInstances() []*LoopInstance {
474 m.mu.RLock()
475 defer m.mu.RUnlock()
476
477 result := make([]*LoopInstance, 0, len(m.instances))
478 for _, instance := range m.instances {
479 instance.mu.Lock()
480 copy := &LoopInstance{
481 Name: instance.Name,
482 PRDPath: instance.PRDPath,
483 WorktreeDir: instance.WorktreeDir,
484 Branch: instance.Branch,
485 State: instance.State,
486 Iteration: instance.Iteration,
487 StartTime: instance.StartTime,
488 Error: instance.Error,
489 }
490 instance.mu.Unlock()
491 result = append(result, copy)
492 }
493
494 return result
495}
496
497// GetRunningPRDs returns the names of all currently running PRDs.
498func (m *Manager) GetRunningPRDs() []string {

Calls

no outgoing calls