pub struct NoopLeaderElector;Expand description
No-op leader elector — always wins leadership immediately. Correct for single-node deployments and tests that do not need real K8s.
Trait Implementations§
Source§impl LeaderElector for NoopLeaderElector
impl LeaderElector for NoopLeaderElector
fn start<'life0, 'async_trait>(
&'life0 self,
_identity: PlatformIdentity,
) -> Pin<Box<dyn Future<Output = Result<LeadershipHandle, PlatformError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for NoopLeaderElector
impl RefUnwindSafe for NoopLeaderElector
impl Send for NoopLeaderElector
impl Sync for NoopLeaderElector
impl Unpin for NoopLeaderElector
impl UnsafeUnpin for NoopLeaderElector
impl UnwindSafe for NoopLeaderElector
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