pub struct PurgeConfig {
pub audience: String,
pub shared_caches: bool,
pub remote_sink: bool,
pub audit: Option<Arc<dyn AutomaticAudit>>,
pub local: Option<Arc<dyn LocalInvalidation>>,
}Expand description
Explicit activation. A shared-cache deployment always needs a global sink.
Fields§
§audience: StringThis server’s canonical origin.
Whether any serving cache is shared between instances.
remote_sink: boolA signed remote purger is configured.
audit: Option<Arc<dyn AutomaticAudit>>Durable acceptance/audit seam for automatic triggers.
local: Option<Arc<dyn LocalInvalidation>>Immediate request-side invalidation; timer 11 durably retries failures.
Implementations§
Source§impl PurgeConfig
impl PurgeConfig
Sourcepub fn new(audience: String, shared_caches: bool, remote_sink: bool) -> Self
pub fn new(audience: String, shared_caches: bool, remote_sink: bool) -> Self
Construct settings; storage-backed auditing is attached at startup.
Sourcepub fn with_audit(self, audit: Arc<dyn AutomaticAudit>) -> Self
pub fn with_audit(self, audit: Arc<dyn AutomaticAudit>) -> Self
Attach the automatic action audit/acceptance implementation.
Sourcepub fn with_local(self, local: Arc<dyn LocalInvalidation>) -> Self
pub fn with_local(self, local: Arc<dyn LocalInvalidation>) -> Self
Attach immediate local invalidation alongside the durable timer handler.
Sourcepub fn validate(&self) -> Result<(), StoreError>
pub fn validate(&self) -> Result<(), StoreError>
Refuse invalid origins and shared caches without a global purger.
Trait Implementations§
Source§impl Clone for PurgeConfig
impl Clone for PurgeConfig
Auto Trait Implementations§
impl !RefUnwindSafe for PurgeConfig
impl !UnwindSafe for PurgeConfig
impl Freeze for PurgeConfig
impl Send for PurgeConfig
impl Sync for PurgeConfig
impl Unpin for PurgeConfig
impl UnsafeUnpin for PurgeConfig
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