-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Controller<T> #184
Controller<T> #184
Conversation
51239fd
to
cea8d9a
Compare
// Prepare a sender so we can stack things back on the channel | ||
let txa = tx.clone(); | ||
// Event loop that triggers the reconcile fn | ||
tokio::spawn(async move { |
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.
Makes sense while prototyping.. but we should try to avoid tokio::spawn
before releasing, because it means that kube-rs
has to take complete control of the error handling. Should be possible to replace most uses with some variant of try_join_all
/try_join!
.
impl<K: 'static, F: 'static> Controller<K, F> | ||
where | ||
K: Clone + DeserializeOwned + Meta + Send + Sync, | ||
F: Fn(ReconcileEvent) -> Result<ReconcileStatus> + Send + Sync, |
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.
It is pretty limiting that F
can't return an impl Future
.
think it's probably easier to do callbacks..
Replaced by #258 |
Sketch of Controller. Heavy WIP for #148
Some thoughts: