pub struct Lifecycle {
pub hook: String,
pub sidecar: bool,
}Expand description
The lifecycle block in Nomad is used to define the order in which tasks are executed within a task group. Main tasks are those without a lifecycle block, and tasks with lifecycle hooks specify their execution timing relative to the main tasks. For more information See https://developer.hashicorp.com/nomad/docs/job-specification/lifecycle for more details.
Fields§
§hook: StringSpecifies when a task should be run within the lifecycle of a group.
sidecar: boolControls whether a task is ephemeral or long-lived within the task group. If a lifecycle task is ephemeral (sidecar = false), the task will not be restarted after it completes successfully. If a lifecycle task is long-lived (sidecar = true) and terminates, it will be restarted as long as the allocation is running.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lifecycle
impl<'de> Deserialize<'de> for Lifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Lifecycle
impl StructuralPartialEq for Lifecycle
Auto Trait Implementations§
impl Freeze for Lifecycle
impl RefUnwindSafe for Lifecycle
impl Send for Lifecycle
impl Sync for Lifecycle
impl Unpin for Lifecycle
impl UnwindSafe for Lifecycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.