Enum glean_core::upload::PingUploadTask
source · pub enum PingUploadTask {
Upload {
request: PingRequest,
},
Wait {
time: u64,
},
Done { /* private fields */ },
}
Expand description
An enum representing the possible upload tasks to be performed by an uploader.
When asking for the next ping request to upload, the requester may receive one out of three possible tasks.
Variants§
Upload
Fields
§
request: PingRequest
The ping request for upload
See PingRequest
for more information.
An upload task
Wait
A flag signaling that the pending pings directories are not done being processed, thus the requester should wait and come back later.
Done
A flag signaling that requester doesn’t need to request any more upload tasks at this moment.
There are three possibilities for this scenario:
- Pending pings queue is empty, no more pings to request;
- Requester has gotten more than MAX_WAIT_ATTEMPTS (3, by default)
PingUploadTask::Wait
responses in a row; - Requester has reported more than MAX_RECOVERABLE_FAILURES_PER_UPLOADING_WINDOW recoverable upload failures on the same uploading window (see below) and should stop requesting at this moment.
An “uploading window” starts when a requester gets a new
PingUploadTask::Upload(PingRequest)
response and finishes when they
finally get a PingUploadTask::Done
or PingUploadTask::Wait
response.
Implementations§
Trait Implementations§
source§impl Debug for PingUploadTask
impl Debug for PingUploadTask
source§impl PartialEq for PingUploadTask
impl PartialEq for PingUploadTask
source§fn eq(&self, other: &PingUploadTask) -> bool
fn eq(&self, other: &PingUploadTask) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PingUploadTask
impl StructuralEq for PingUploadTask
impl StructuralPartialEq for PingUploadTask
Auto Trait Implementations§
impl RefUnwindSafe for PingUploadTask
impl Send for PingUploadTask
impl Sync for PingUploadTask
impl Unpin for PingUploadTask
impl UnwindSafe for PingUploadTask
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more