WaitFor blocks until the accumulated output contains signal or ctx expires. Returns nil on match, ctx.Err() on timeout. Safe to call from any goroutine.
(ctx context.Context, signal string)
| 53 | // ctx expires. Returns nil on match, ctx.Err() on timeout. |
| 54 | // Safe to call from any goroutine. |
| 55 | func (wb *WaitBuffer) WaitFor(ctx context.Context, signal string) error { |
| 56 | return wb.WaitForNth(ctx, signal, 1) |
| 57 | } |
| 58 | |
| 59 | // WaitForNth blocks until the accumulated output contains at least |
| 60 | // n occurrences of signal, or ctx expires. Returns nil on match, |