|
1 | 1 | #[cfg(feature = "unstable-runtime-predicates")] |
2 | 2 | use crate::utils::predicate::{Predicate, PredicateFilter}; |
3 | 3 | use crate::{ |
4 | | - utils::{event_flatten::EventFlatten, event_modify::EventModify, stream_backoff::StreamBackoff}, |
| 4 | + utils::{event_decode::EventDecode, event_modify::EventModify, stream_backoff::StreamBackoff}, |
5 | 5 | watcher, |
6 | 6 | }; |
7 | 7 | use kube_client::Resource; |
@@ -33,24 +33,24 @@ pub trait WatchStreamExt: Stream { |
33 | 33 | StreamBackoff::new(self, b) |
34 | 34 | } |
35 | 35 |
|
36 | | - /// Flatten a [`watcher()`] stream into a stream of applied objects |
| 36 | + /// Decode a [`watcher()`] stream into a stream of applied objects |
37 | 37 | /// |
38 | 38 | /// All Added/Modified events are passed through, and critical errors bubble up. |
39 | | - fn applied_objects<K>(self) -> EventFlatten<Self> |
| 39 | + fn applied_objects<K>(self) -> EventDecode<Self> |
40 | 40 | where |
41 | 41 | Self: Stream<Item = Result<watcher::Event<K>, watcher::Error>> + Sized, |
42 | 42 | { |
43 | | - EventFlatten::new(self, false) |
| 43 | + EventDecode::new(self, false) |
44 | 44 | } |
45 | 45 |
|
46 | | - /// Flatten a [`watcher()`] stream into a stream of touched objects |
| 46 | + /// Decode a [`watcher()`] stream into a stream of touched objects |
47 | 47 | /// |
48 | 48 | /// All Added/Modified/Deleted events are passed through, and critical errors bubble up. |
49 | | - fn touched_objects<K>(self) -> EventFlatten<Self> |
| 49 | + fn touched_objects<K>(self) -> EventDecode<Self> |
50 | 50 | where |
51 | 51 | Self: Stream<Item = Result<watcher::Event<K>, watcher::Error>> + Sized, |
52 | 52 | { |
53 | | - EventFlatten::new(self, true) |
| 53 | + EventDecode::new(self, true) |
54 | 54 | } |
55 | 55 |
|
56 | 56 | /// Modify elements of a [`watcher()`] stream. |
@@ -88,7 +88,7 @@ pub trait WatchStreamExt: Stream { |
88 | 88 | EventModify::new(self, f) |
89 | 89 | } |
90 | 90 |
|
91 | | - /// Filter out a flattened stream on [`predicates`](crate::predicates). |
| 91 | + /// Filter a stream based on on [`predicates`](crate::predicates). |
92 | 92 | /// |
93 | 93 | /// This will filter out repeat calls where the predicate returns the same result. |
94 | 94 | /// Common use case for this is to avoid repeat events for status updates |
|
0 commit comments