processEvents processes terminal input events. This is the body of the event collecting goroutine.
(ctx context.Context)
| 304 | // processEvents processes terminal input events. |
| 305 | // This is the body of the event collecting goroutine. |
| 306 | func (td *termdash) processEvents(ctx context.Context) { |
| 307 | defer close(td.exitCh) |
| 308 | |
| 309 | for { |
| 310 | ev := td.term.Event(ctx) |
| 311 | if ev != nil { |
| 312 | td.eds.Event(ev) |
| 313 | } |
| 314 | |
| 315 | select { |
| 316 | case <-ctx.Done(): |
| 317 | return |
| 318 | default: |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | // start starts the terminal dashboard. Blocks until the context expires or |
| 324 | // until stop() is called. |
no test coverage detected