pub struct Reconciler { /* private fields */ }Expand description
Implementations§
Source§impl Reconciler
impl Reconciler
Sourcepub async fn reconcile(
&self,
app: &Arc<SzRustApp>,
) -> Result<ReconcileResult, ControllerError>
pub async fn reconcile( &self, app: &Arc<SzRustApp>, ) -> Result<ReconcileResult, ControllerError>
Reconcile 一个 SzRustApp 资源
根据资源状态执行对应操作:
- 资源存在且 Deployment 不存在 → 创建
- 资源存在且 Deployment 存在但 spec 不匹配 → 更新
- 资源存在且 Deployment 存在且 spec 匹配 → 无操作
- 资源被删除 → 清理
Sourcepub async fn update_status(
&self,
app: &Arc<SzRustApp>,
status: SzRustAppStatus,
) -> Result<(), ControllerError>
pub async fn update_status( &self, app: &Arc<SzRustApp>, status: SzRustAppStatus, ) -> Result<(), ControllerError>
更新 SzRustApp status
Sourcepub async fn stats(&self) -> ReconcilerStats
pub async fn stats(&self) -> ReconcilerStats
获取统计信息
Auto Trait Implementations§
impl !RefUnwindSafe for Reconciler
impl !UnwindSafe for Reconciler
impl Freeze for Reconciler
impl Send for Reconciler
impl Sync for Reconciler
impl Unpin for Reconciler
impl UnsafeUnpin for Reconciler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more