pub struct UrlTracker {
pub counts: Arc<DashMap<String, usize>>,
}Expand description
Thread-safe hit counter for presigned URLs.
Tracks how many times each presigned URL has been used so that a configurable maximum can be enforced. Regular (re-signed) requests are not tracked — the aws-cli issues parallel range-GET sub-requests for the same object, which would exhaust a small limit instantly.
Internally backed by a [DashMap] so that concurrent access from multiple
Pingora worker threads never requires a global lock.
Fields§
§counts: Arc<DashMap<String, usize>>Per-URL hit counters.
Implementations§
Trait Implementations§
Source§impl Clone for UrlTracker
impl Clone for UrlTracker
Source§fn clone(&self) -> UrlTracker
fn clone(&self) -> UrlTracker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UrlTracker
impl !RefUnwindSafe for UrlTracker
impl Send for UrlTracker
impl Sync for UrlTracker
impl Unpin for UrlTracker
impl UnsafeUnpin for UrlTracker
impl !UnwindSafe for UrlTracker
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Mutably borrows from an owned value. Read more