MCPcopy Index your code
hub / github.com/coder/coder / IsReady

Method IsReady

agent/unit/manager.go:141–154  ·  view source on GitHub ↗
(id ID)

Source from the content-addressed store, hash-verified

139}
140
141func (m *Manager) IsReady(id ID) (bool, error) {
142 if id == "" {
143 return false, xerrors.Errorf("unit ID cannot be empty: %w", ErrUnitIDRequired)
144 }
145
146 m.mu.RLock()
147 defer m.mu.RUnlock()
148
149 if !m.registered(id) {
150 return true, nil
151 }
152
153 return m.units[id].ready, nil
154}
155
156// AddDependency adds a dependency relationship between units.
157// The unit depends on the dependsOn unit reaching the requiredStatus.

Callers 9

TestManager_RegisterFunction · 0.95
TestManager_UpdateStatusFunction · 0.95
TestManager_IsReadyFunction · 0.95
SyncStartMethod · 0.80
SyncReadyMethod · 0.80
SyncStatusMethod · 0.80

Calls 2

registeredMethod · 0.95
ErrorfMethod · 0.45

Tested by 6

TestManager_RegisterFunction · 0.76
TestManager_UpdateStatusFunction · 0.76
TestManager_IsReadyFunction · 0.76