tmux.NotificationStream
Go
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- tmux
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/notification_stream.go
-
NotificationStream owns one observation-only control client attached to a session. It yields tmux notifications in wire order and must be closed. Before tmux 3.6, destroying the attached session follows that session's detach-on-destroy policy and may end the stream.
Discussed in Context managers
7 declared, 0 inherited
Members
- Close method Close stops the notification stream. It is safe to call concurrently and more than once.
- CloseContext method CloseContext starts idempotent stream shutdown and waits within ctx. The context bounds only the wait; a later call may resume waiting for shutdown.
- ContinuePane method ContinuePane resumes pane output tmux held after this stream fell behind on it. tmux does not replay what it held, so read the pane to recover that span rather than waiting for it. Resuming a pane tmux never paused does nothing and reports nothing, because tmux answers neither.
- Next method Next returns the next ordered control-mode notification. Exactly one caller may use Next at a time.
- Notifications method Notifications returns
NotificationStream.Nextas a range loop; exactly one iterator or direct read may run at a time. Malformed notifications yield their error and iteration continues; every other error ends the loop after being yielded. - Subscribe method Subscribe asks tmux to evaluate request's format and report it on this stream as a subscription-changed notification, read with
ControlNotification.Subscription. tmux reports the value at its next evaluation, about a second later, and then each time it changes. Arming a name already armed replaces its format. - Unsubscribe method Unsubscribe stops the subscription armed under name. Stopping a name that was never armed does nothing and reports nothing, because tmux answers neither.