What's Changed
- Simplify authentication (with interceptor) by @belltoy in #106
- Re-design watch stream API by @belltoy in #108
- Expose more protobuf structs to make transactions testable and mockable by @g-murzik in #25
- fix: return error instead of panic when connect_with_balanced_channel by @belltoy in #78
Breaking Changes
Upgrade from pre 0.17 to 0.18
Since 0.18, the WatchClient API has changed to support watch stream error handling precisely.
The WatchClient is not a high level watcher, it is just a watch API stub. So it should be only
responsible for sending requests and receiving responses. Let the high level watcher decide what
to do if received an unexpected response.
- WatchClient::watch(key: impl Into<Vec<u8>>, options: Option<WatchOptions>) -> Result<(WatchResponse, Watcher, WatchStream)>
+ WatchClient::watch(key: impl Into<Vec<u8>>, options: Option<WatchOptions>) -> Result<WatchStream>The new WatchStream is different from the old version. It represents underlying bidirectional
watch stream (HTTP 2 stream). So it can be used to send requests and receive responses and events.
It's the user's responsibility to check the received response is a response or an event, if it is
created successfully or not, or if it is a cancel response.
See watch.rs for example.
Full Changelog: v0.17.0...v0.18.0