-
-
Notifications
You must be signed in to change notification settings - Fork 163
feat: add the WatchState API #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@hds Do you have time to take a quick look at this pull request before I continue? I want to ensure I'm on the right track and understand your feedback correctly. Do you have any thoughts on how to use it with |
|
@Rustin170506 I think this is the right approach. To integrate this with Tokio-Console, I would get the console/tokio-console/src/main.rs Line 81 in f8e1bee
To make the UI "reactive" even in the event of network slow down, we may want to have some additional states in Tokio Console for "pausing" and "unpausing" which would be set in between the user pressing the space bar and the new state being received from the Does that make sense? |
The issue at hand is that when we call |
|
My thought was to do it all simultaneously. |
dff938a to
ce6331a
Compare
29263be to
b7e65ce
Compare
0xPoe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔢 Self-check (PR reviewed by myself and ready for feedback.)
|
@hds, I finally have some time to fix it. Could you please take a look? Thank you! |
hds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is looking great!
I've got one suggestion regarding the user experience and a question regarding cancel safety.
0xPoe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔢 Self-check (PR reviewed by myself and ready for feedback.)
hds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you!
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
Signed-off-by: Rustin170506 <[email protected]>
71269d4 to
aa85882
Compare
|
Rebaed to the latest master. |
|
Thanks for your review! 💚 💙 💜 💛 ❤️ |
…onsole-v0.1.14 # console-api ## 0.9.0 - (2025-10-29) ### <a id = "0.9.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) ### Fixed - Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592)) ### Updated - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # console-subscriber ## 0.5.0 - (2025-10-29) ### <a id = "0.5.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Documented - Fix typo in doc comment ([3dbca7a](3dbca7a)) ### Updated - [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # tokio-console ## 0.1.14 - (2025-10-29) ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Fixed - Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523)) ### Updated - Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - Upgrade tonic to 0.14 ([#645](#645))
…onsole-v0.1.14 # console-api ## 0.9.0 - (2025-10-29) ### <a id = "0.9.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) ### Fixed - Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592)) ### Updated - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # console-subscriber ## 0.5.0 - (2025-10-29) ### <a id = "0.5.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Documented - Fix typo in doc comment ([3dbca7a](3dbca7a)) ### Updated - [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # tokio-console ## 0.1.14 - (2025-10-29) ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Fixed - Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523)) ### Updated - Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - Upgrade tonic to 0.14 ([#645](#645))
…onsole-v0.1.14 # console-api ## 0.9.0 - (2025-10-30) ### <a id = "0.9.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) ### Fixed - Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592)) ### Updated - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # console-subscriber ## 0.5.0 - (2025-10-30) ### <a id = "0.5.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Documented - Fix typo in doc comment ([3dbca7a](3dbca7a)) ### Updated - [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # tokio-console ## 0.1.14 - (2025-10-30) ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Fixed - Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523)) ### Updated - Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - Upgrade tonic to 0.14 ([#645](#645))
…onsole-v0.1.14 (#648) # console-api ## 0.9.0 - (2025-10-30) ### <a id = "0.9.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) ### Fixed - Bump minimum version of tonic ([#593](#593)) ([1f41b61](1f41b61), closes [#592](#592), closes [#592](#592)) ### Updated - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # console-subscriber ## 0.5.0 - (2025-10-30) ### <a id = "0.5.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.13 ([#615](#615 ([2bd1afd](https://github.com/tokio-rs/console/commit/2bd1afda7987dea0505d231d9ce8bf109e5f7a96))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.12.x. - **Upgrade tonic to 0.14 ([#642](https://github.com/tokio-rs/console/issues/642))**<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.13.x. ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Documented - Fix typo in doc comment ([3dbca7a](3dbca7a)) ### Updated - [**breaking**](#0.5.0-breaking) Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - [**breaking**](#0.9.0-breaking) Upgrade tonic to 0.14 ([#645](#645)) # tokio-console ## 0.1.14 - (2025-10-30) ### Added - Add the WatchState API ([#582](#582)) ([7c1f9f2](7c1f9f2)) - Improve error msg when state streaming API is unimplemented ([#598](#598)) ([6ef148a](6ef148a)) - Add support for vsock connections ([#623](#623)) ([63c70ee](63c70ee)) ### Fixed - Add dynamic constraints layout in task details screen ([#614](#614)) ([ada7dab](ada7dab), fixes [#523](#523), fixes [#523](#523)) ### Updated - Upgrade tonic to 0.13 ([#615](#615)) ([2bd1afd](2bd1afd)) - Upgrade tonic to 0.14 ([#645](#645)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
close #551
close #567
This pull request introduces a new stream API named "WatchState." Currently, it only provides the current temporality, which will enable clients to check if the server has been paused.
See more: #567 (comment)
Screen.Recording.2024-10-26.at.17.18.50.mov