pub struct ConfigUpdateHandler { /* private fields */ }Expand description
Handler for config updates from agents.
Implementations§
Source§impl ConfigUpdateHandler
impl ConfigUpdateHandler
Sourcepub fn on_rule_update<F>(self, f: F) -> Self
pub fn on_rule_update<F>(self, f: F) -> Self
Set the rule update callback.
Sourcepub fn on_list_update<F>(self, f: F) -> Self
pub fn on_list_update<F>(self, f: F) -> Self
Set the list update callback.
Sourcepub fn handle(&self, request: ConfigUpdateRequest) -> ConfigUpdateResponse
pub fn handle(&self, request: ConfigUpdateRequest) -> ConfigUpdateResponse
Handle a config update request.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get pending update count.
Sourcepub fn clear_old_pending(&self, max_age: Duration)
pub fn clear_old_pending(&self, max_age: Duration)
Clear old pending updates.
Trait Implementations§
Source§impl Debug for ConfigUpdateHandler
impl Debug for ConfigUpdateHandler
Auto Trait Implementations§
impl !Freeze for ConfigUpdateHandler
impl !RefUnwindSafe for ConfigUpdateHandler
impl Send for ConfigUpdateHandler
impl Sync for ConfigUpdateHandler
impl Unpin for ConfigUpdateHandler
impl !UnwindSafe for ConfigUpdateHandler
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
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>
Wrap the input message
T in a tonic::Request