tmux.ControlClient.Notifications
Go
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- tmux
- Declared in
- ControlClient
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/control_stream.go
- Notifications ( ctx : context.Context ) iter.Seq2[ControlNotification, error]
-
Notifications returns an iterator over what tmux says without being asked: pane output, and the events behind
ControlNotification.It is
ControlClient.NextNotificationas a range loop; exactly one iterator or direct notification read may run at a time.for notification, err := range client.Notifications(ctx) { if err != nil { return err } if pane, output, ok := notification.Output(); ok { handle(pane, output) } }
Malformed or unknown notifications yield their error and iteration continues. Every other error ends the stream after being yielded, including the
ErrControlStreamLostor os.ErrClosedControlClient.NextNotificationreports at a natural end.Leaving early preserves queued notifications for the next read.
0 declared, 0 inherited