waitForReady waits for the container to become ready or context to be canceled. Returns true if ready, false if canceled.
(ctx context.Context)
| 67 | // waitForReady waits for the container to become ready or context to be canceled. |
| 68 | // Returns true if ready, false if canceled. |
| 69 | func (w *Watcher) waitForReady(ctx context.Context) bool { |
| 70 | // Check if already ready |
| 71 | if w.ready() { |
| 72 | return true |
| 73 | } |
| 74 | |
| 75 | // Wait for ready notification or context cancellation |
| 76 | select { |
| 77 | case <-w.readyNotifyCh: |
| 78 | return true |
| 79 | case <-ctx.Done(): |
| 80 | return false |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func (w *Watcher) waitStarted(reqCtx context.Context) bool { |
| 85 | select { |
no test coverage detected