pub struct Task {Show 30 fields
pub dispatch_payload: Option<DispatchPayloadConfig>,
pub leader: bool,
pub kind: String,
pub actions: Vec<Action>,
pub kill_timeout: Option<TimeDelta>,
pub lifecycle: Option<TaskLifecycle>,
pub meta: HashMap<String, String>,
pub csi_plugin_config: Option<TaskCSIPluginConfig>,
pub driver: String,
pub env: HashMap<String, String>,
pub restart_policy: Option<RestartPolicy>,
pub log_config: Option<LogConfig>,
pub shutdown_delay: Option<TimeDelta>,
pub scaling_policies: Vec<ScalingPolicy>,
pub identities: Vec<WorkloadIdentity>,
pub affinities: Vec<Affinity>,
pub resources: Option<Resources>,
pub templates: Vec<Template>,
pub kill_signal: Option<String>,
pub identity: Option<WorkloadIdentity>,
pub user: String,
pub constraints: Vec<Constraint>,
pub artifacts: Vec<TaskArtifact>,
pub vault: Option<Vault>,
pub name: String,
pub consul: Option<Consul>,
pub schedule: Option<TaskSchedule>,
pub volume_mounts: Vec<VolumeMount>,
pub services: Vec<Service>,
pub config: HashMap<String, Value>,
}
Expand description
Task is a single process in a task group.
This struct was generated based on the Go types of the official Nomad API.
Fields§
§dispatch_payload: Option<DispatchPayloadConfig>
§leader: bool
§kind: String
§actions: Vec<Action>
§kill_timeout: Option<TimeDelta>
§lifecycle: Option<TaskLifecycle>
§meta: HashMap<String, String>
§csi_plugin_config: Option<TaskCSIPluginConfig>
§driver: String
§env: HashMap<String, String>
§restart_policy: Option<RestartPolicy>
§log_config: Option<LogConfig>
§shutdown_delay: Option<TimeDelta>
§scaling_policies: Vec<ScalingPolicy>
§identities: Vec<WorkloadIdentity>
Workload Identities
affinities: Vec<Affinity>
§resources: Option<Resources>
§templates: Vec<Template>
§kill_signal: Option<String>
§identity: Option<WorkloadIdentity>
Identity is the default Nomad Workload Identity and will be added to Identities with the name “default”
user: String
§constraints: Vec<Constraint>
§artifacts: Vec<TaskArtifact>
§vault: Option<Vault>
§name: String
§consul: Option<Consul>
§schedule: Option<TaskSchedule>
§volume_mounts: Vec<VolumeMount>
§services: Vec<Service>
§config: HashMap<String, Value>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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 StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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