pub struct Hook { /* private fields */ }
Expand description
Hook specifies a command that is run at a particular event in the lifecycle of a container.
Implementations§
source§impl Hook
impl Hook
sourcepub fn path(&self) -> &PathBuf
pub fn path(&self) -> &PathBuf
Path to the binary to be executed. Following similar semantics to
IEEE Std 1003.1-2008 execv
’s path. This
specification extends the IEEE standard in that path MUST be
absolute.
source§impl Hook
impl Hook
sourcepub fn set_path(&mut self, val: PathBuf) -> &mut Self
pub fn set_path(&mut self, val: PathBuf) -> &mut Self
Path to the binary to be executed. Following similar semantics to
IEEE Std 1003.1-2008 execv
’s path. This
specification extends the IEEE standard in that path MUST be
absolute.
sourcepub fn set_args(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_args(&mut self, val: Option<Vec<String>>) -> &mut Self
Arguments used for the binary, including the binary name itself.
Following the same semantics as IEEE Std 1003.1-2008
execv
’s argv.
sourcepub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_env(&mut self, val: Option<Vec<String>>) -> &mut Self
Additional key=value
environment variables. Following the same
semantics as IEEE Std 1003.1-2008’s environ
.
sourcepub fn set_timeout(&mut self, val: Option<i64>) -> &mut Self
pub fn set_timeout(&mut self, val: Option<i64>) -> &mut Self
Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero.