#[non_exhaustive]pub enum PuppetEvent {
Ready,
Shutdown {
supervisor_event_id: Option<u64>,
},
Reboot {
supervisor_event_id: Option<u64>,
},
RunCommandError {
supervisor_event_id: u64,
error: String,
},
RunCommandOutput {
supervisor_event_id: u64,
output: Vec<u8>,
stream: CommandOutputStream,
},
RunCommandExitCode {
supervisor_event_id: u64,
exit_code: Option<i32>,
killed: bool,
},
TerminateJob {
supervisor_event_id: Option<u64>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ready
The puppet has started and completed all initialization necessary for the host to be used, either to run automated commands or for interactive sessions.
Shutdown
The puppet is about to shut down.
If this happens in response to a supervisor-issued event, the puppet should include its event id here.
A puppet should inform the supervisor of every host shutdown, but is allowed to only inform it of ones that have been requested by it.
Reboot
The puppet is about to reboot.
If this happens in response to a supervisor-issued event, the puppet should include its event id here.
A puppet should inform the supervisor of every host reboot, but is allowed to only inform it of ones that have been requested by it.
RunCommandError
Running a command requested by the supervisor failed. This event includes an error message of what went wrong.
This event will be the last event related to a given RunCommand event
sent by the supervisor.
RunCommandOutput
Output of a command (streaming).
RunCommandExitCode
Exit code of a command.
This event will be the last event related to a given RunCommand event
sent by the supervisor.
TerminateJob
Ask the supervisor to terminate this job.
This is an infallible operation, and the puppet will not have a chance to be notified of the successful completion of this operation. Thus we implement it as an event, not as a request.
If this termination is performed in response to a request by a supervisor, the puppet should include this original supervisor event ID here:
Trait Implementations§
Source§impl Clone for PuppetEvent
impl Clone for PuppetEvent
Source§fn clone(&self) -> PuppetEvent
fn clone(&self) -> PuppetEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more