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

Method GetState

internal/loop/manager.go:431–444  ·  view source on GitHub ↗

GetState returns the state of a specific PRD loop.

(name string)

Source from the content-addressed store, hash-verified

429
430// GetState returns the state of a specific PRD loop.
431func (m *Manager) GetState(name string) (LoopState, int, error) {
432 m.mu.RLock()
433 instance, exists := m.instances[name]
434 m.mu.RUnlock()
435
436 if !exists {
437 return LoopStateReady, 0, fmt.Errorf("PRD %s not found", name)
438 }
439
440 instance.mu.Lock()
441 defer instance.mu.Unlock()
442
443 return instance.State, instance.Iteration, instance.Error
444}
445
446// GetInstance returns a copy of the loop instance data for a specific PRD.
447func (m *Manager) GetInstance(name string) *LoopInstance {

Callers 2

TestManagerGetStateFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestManagerGetStateFunction · 0.76