pub struct RemoteConfigurationWorker { /* private fields */ }Expand description
Drives polling and delivery for a RemoteConfigurationClient.
A supervisor can own and restart the worker, or the caller can drive it directly with run.
The worker does not exit on connection failures, on the Agent having remote configuration disabled, on the Agent reporting its configuration expired, or on a panic in a subscriber’s decoder. It keeps polling through all of them, so it exits only on a failure in the client itself.
A restart keeps every subscription and each product’s last accepted snapshot, and discards the protocol state, so the restarted worker fetches and decodes everything again. Subscribers may therefore see a snapshot equal to the one they already hold.
Failed polls, responses the client cannot apply, and rejected configurations are counted in the client’s metrics. Subscribers see only their own decoding errors, so they need the metrics or worker logs to see other failures.
Implementations§
Source§impl RemoteConfigurationWorker
impl RemoteConfigurationWorker
Sourcepub async fn run(self) -> Result<(), GenericError>
pub async fn run(self) -> Result<(), GenericError>
Runs the worker without a supervisor.
This polls until the returned future is dropped.
§Errors
Returns an error only on a failure in the client itself. Connection failures, remote configuration being disabled on the Agent, and rejected or panicking decoders are handled without returning.
Trait Implementations§
Source§impl Debug for RemoteConfigurationWorker
impl Debug for RemoteConfigurationWorker
Source§impl Supervisable for RemoteConfigurationWorker
impl Supervisable for RemoteConfigurationWorker
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
process_shutdown: ShutdownHandle,
) -> Pin<Box<dyn Future<Output = Result<SupervisorFuture, InitializationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
process_shutdown: ShutdownHandle,
) -> Pin<Box<dyn Future<Output = Result<SupervisorFuture, InitializationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn shutdown_strategy(&self) -> ShutdownStrategy
fn shutdown_strategy(&self) -> ShutdownStrategy
Source§fn wants_shutdown_signal(&self) -> bool
fn wants_shutdown_signal(&self) -> bool
Auto Trait Implementations§
impl Freeze for RemoteConfigurationWorker
impl !RefUnwindSafe for RemoteConfigurationWorker
impl Send for RemoteConfigurationWorker
impl Sync for RemoteConfigurationWorker
impl Unpin for RemoteConfigurationWorker
impl !UnwindSafe for RemoteConfigurationWorker
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
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> 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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more