Skip to content

Commit

Permalink
Put StreamSubscribe behind a feature flag unstable_runtime_subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
danrspencer committed Feb 17, 2023
1 parent ec5cdc0 commit 70c6ccb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kube-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ categories = ["web-programming::http-client", "caching", "network-programming"]
rust-version = "1.60.0"
edition = "2021"

[features]
unstable_runtime = ["unstable_runtime_subscribe"]
unstable_runtime_subscribe = []

[package.metadata.docs.rs]
features = ["k8s-openapi/v1_26"]
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
Expand Down
1 change: 1 addition & 0 deletions kube-runtime/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod watch_ext;
pub use backoff_reset_timer::ResetTimerBackoff;
pub use event_flatten::EventFlatten;
pub use stream_backoff::StreamBackoff;
#[cfg(feature = "unstable_runtime_subscribe")]
pub use stream_subscribe::StreamSubscribe;
pub use watch_ext::WatchStreamExt;

Expand Down
1 change: 1 addition & 0 deletions kube-runtime/src/utils/watch_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub trait WatchStreamExt: Stream {
/// (stream_subscribe, explain_stream)
/// }
/// ```
#[cfg(feature = "unstable_runtime_subscribe")]
fn stream_subscribe<K>(self) -> StreamSubscribe<Self>
where
Self: Stream<Item = Result<watcher::Event<K>, watcher::Error>> + Send + Sized + 'static,
Expand Down

0 comments on commit 70c6ccb

Please sign in to comment.