#[non_exhaustive]pub enum SupervisorEvent {
SSHKeysUpdated,
ShutdownReq,
RebootReq,
RunCommand {
cmdline: Vec<u8>,
environment: Vec<(Vec<u8>, Vec<u8>)>,
},
KillCommand {
supervisor_event_id: u64,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SSHKeysUpdated
The set of SSH keys provided by the supervisor has been updated.
Based on this event, the puppet may want to update the set of SSH keys that is authorized to log into the host.
ShutdownReq
Request that the host on which the puppet is running be shut down.
Before executing the shutdown request, the puppet should acknowledge
that this event will be executed through a PuppetMsg. The puppet may
perform a delayed shutdown, to ensure successful message delivery and
perhaps inform any active users. The delay should be kept short, usually
under a minute.
RebootReq
Request that the host on which the puppet is running be rebooted.
Before executing the reboot request, the puppet should acknowledge that
this event will be executed through a PuppetMsg. The puppet may
perform a delayed reboot, to ensure successful message delivery and
perhaps inform any active users. The delay should be kept short, usually
under a minute.
RunCommand
Request to run a command on the host.
Multiple commands may be executed at the same time (i.e., this should be non-blocking). The command can be executed from an arbitrary working directory, with the same permissions as the puppet process (likely, root user). Related output (stdout, stderr, exit code) should be streamed back to the supervisor while referencing this event’s id.
The supervisor is responsible for sending the puppet a command line and
environment parameters that the puppet can decode into OsStrs valid
for its host platform.
In case that running a command failed, the puppet should send back a
RunCommandError.
KillCommand
Request a command to be killed.
Trait Implementations§
Source§impl Clone for SupervisorEvent
impl Clone for SupervisorEvent
Source§fn clone(&self) -> SupervisorEvent
fn clone(&self) -> SupervisorEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more