pub enum CollaborativeRebootSchedulerRequest {
ScheduleReboot {
reason: CollaborativeRebootReason,
cancel: Option<EventPair>,
responder: CollaborativeRebootSchedulerScheduleRebootResponder,
},
}
Expand description
A scheduler of collaborative device reboots.
Collaborative reboot is a mechanism that allows multiple actors to work
together to schedule a device reboot at a time that avoids user disruption.
Actors fulfill one of two roles: Scheduler or Initiator. The scheduler
registers the desire to reboot the device at a later point in time, while
the initiator identifies appropriate times to perform a reboot and actuates
any scheduled requests. This protocol fulfills the scheduler role. For the
initiator role’s protocol, see
[fuchsia.power/CollaborativeRebootInitiator
].
Collaborative reboot can be used when the platform is configured to let the product drive reboot scheduling.
As a concrete example, this mechanism can be used to drive software updates. When the platform identifies that there is an outstanding software update to apply, it can download the update, and schedule a collaborative reboot. Later, when the product identifies that it is an appropriate time for the device to reboot (say, after it’s observed a sufficient period of user inactivity), it can initate the collaborative reboot.
Variants§
ScheduleReboot
Schedules a collaborative reboot.
Notifies the server of a new reason to perform collaborative reboot. This method may be called multiple times, by multiple actors for a single collaborative reboot.
The server will not respond to the method until the request has been scheduled.
Arguments:
- reason: The reason for requesting the collaborative reboot.
- cancel: An optional Zircon Eventpair. If provided, the caller may
cancel their request by signaling the event’s peer. A
canceled request will not cause a future call to
[
CollaborativeRebootInitiator.PerformPendingReboot
] to initiate a reboot. AnyZX_USER_SIGNAL_*
can be used to cancel the request. If the server observesZX_OBJECT_PEER_CLOSED
(i.e. because the client dropped the event pair), it will be interpretted as a cancellation.
Fields
reason: CollaborativeRebootReason
Implementations§
Source§impl CollaborativeRebootSchedulerRequest
impl CollaborativeRebootSchedulerRequest
pub fn into_schedule_reboot( self, ) -> Option<(CollaborativeRebootReason, Option<EventPair>, CollaborativeRebootSchedulerScheduleRebootResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL