pub struct TargetTlsReloadCoordinator { /* private fields */ }Expand description
The top-level coordinator that manages TLS reload for all registered targets.
Typically one instance per process, held alongside TargetRuntimeManager.
Each registered target gets its own background poll loop that periodically
checks TLS fingerprints and drives the build/apply cycle.
Implementations§
Source§impl TargetTlsReloadCoordinator
impl TargetTlsReloadCoordinator
pub fn new() -> Self
Sourcepub async fn register<T: ReloadableTargetTls>(
&self,
target: Arc<T>,
options: TlsReloadOptions,
) -> Result<Arc<TargetTlsRuntimeState<T::Material>>, TargetError>
pub async fn register<T: ReloadableTargetTls>( &self, target: Arc<T>, options: TlsReloadOptions, ) -> Result<Arc<TargetTlsRuntimeState<T::Material>>, TargetError>
Register a target for coordinated TLS reload. Spawns a background poll loop.
Returns the initial runtime state that the target should hold for
accessing the current TLS material via ArcSwap.
Sourcepub async fn unregister(&self, target_label: &str) -> Result<(), TargetError>
pub async fn unregister(&self, target_label: &str) -> Result<(), TargetError>
Unregister a target and stop its poll loop.
Sourcepub async fn force_reload<T: ReloadableTargetTls>(
&self,
target: &T,
runtime_state: &TargetTlsRuntimeState<T::Material>,
options: &TlsReloadOptions,
) -> Result<TargetTlsGeneration, TargetError>
pub async fn force_reload<T: ReloadableTargetTls>( &self, target: &T, runtime_state: &TargetTlsRuntimeState<T::Material>, options: &TlsReloadOptions, ) -> Result<TargetTlsGeneration, TargetError>
Force an immediate reload check for a specific target. Used by admin endpoints and test harnesses.
Sourcepub fn build_status_snapshot<M>(
runtime_state: &TargetTlsRuntimeState<M>,
options: &TlsReloadOptions,
) -> TargetTlsStatusSnapshot
pub fn build_status_snapshot<M>( runtime_state: &TargetTlsRuntimeState<M>, options: &TlsReloadOptions, ) -> TargetTlsStatusSnapshot
Collect status snapshots from all registered targets. The caller must provide the runtime states separately since the coordinator does not hold type-erased references to them.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TargetTlsReloadCoordinator
impl !RefUnwindSafe for TargetTlsReloadCoordinator
impl Send for TargetTlsReloadCoordinator
impl Sync for TargetTlsReloadCoordinator
impl Unpin for TargetTlsReloadCoordinator
impl UnsafeUnpin for TargetTlsReloadCoordinator
impl UnwindSafe for TargetTlsReloadCoordinator
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request