Skip to content

Commit

Permalink
Rename PostReconciler to RescheduleReconciliation
Browse files Browse the repository at this point in the history
As suggested by @clux

Signed-off-by: Teo Klestrup Röijezon <[email protected]>
  • Loading branch information
nightkr committed Jun 9, 2022
1 parent ebf1607 commit 457bdb1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kube-runtime/src/controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ where
.into_future()
.then(move |res| {
let error_policy = error_policy;
PostReconciler::new(
RescheduleReconciliation::new(
res,
|err| error_policy(err, error_policy_ctx),
request.obj_ref.clone(),
Expand Down Expand Up @@ -308,19 +308,19 @@ where
.on_complete(async { tracing::debug!("applier terminated") })
}

/// Internal helper that runs post-reconciliation (such as requesting rescheduling) tasks in the scheduled context of the reconciler
/// Internal helper [`Future`] that reschedules reconciliation of objects (if required), in the scheduled context of the reconciler
///
/// This could be an `async fn`, but isn't because we want it to be [`Unpin`]
#[pin_project]
#[must_use]
struct PostReconciler<K: Resource, ReconcilerErr> {
struct RescheduleReconciliation<K: Resource, ReconcilerErr> {
reschedule_tx: channel::mpsc::Sender<ScheduleRequest<ReconcileRequest<K>>>,

reschedule_request: Option<ScheduleRequest<ReconcileRequest<K>>>,
result: Option<Result<Action, ReconcilerErr>>,
}

impl<K, ReconcilerErr> PostReconciler<K, ReconcilerErr>
impl<K, ReconcilerErr> RescheduleReconciliation<K, ReconcilerErr>
where
K: Resource,
{
Expand Down Expand Up @@ -351,7 +351,7 @@ where
}
}

impl<K, ReconcilerErr> Future for PostReconciler<K, ReconcilerErr>
impl<K, ReconcilerErr> Future for RescheduleReconciliation<K, ReconcilerErr>
where
K: Resource,
{
Expand Down

0 comments on commit 457bdb1

Please sign in to comment.