Trait glean_core::OnGleanEvents
source · [−]pub trait OnGleanEvents: Send {
fn on_initialize_finished(&self);
fn trigger_upload(&self);
fn start_metrics_ping_scheduler(&self) -> bool;
fn cancel_uploads(&self);
}
Expand description
A callback object used to trigger actions on the foreign-language side.
A callback object is stored in glean-core for the entire lifetime of the application.
Required Methods
fn on_initialize_finished(&self)
fn on_initialize_finished(&self)
Initialization finished.
The language SDK can do additional things from within the same initializer thread, e.g. starting to observe application events for foreground/background behavior. The observer then needs to call the respective client activity API.
fn trigger_upload(&self)
fn trigger_upload(&self)
Trigger the uploader whenever a ping was submitted.
This should not block. The uploader needs to asynchronously poll Glean for new pings to upload.
fn start_metrics_ping_scheduler(&self) -> bool
fn start_metrics_ping_scheduler(&self) -> bool
Start the Metrics Ping Scheduler.
fn cancel_uploads(&self)
fn cancel_uploads(&self)
Called when upload is disabled and uploads should be stopped