#[non_exhaustive]pub struct ExecutionTemplate {
pub labels: HashMap<String, String>,
pub annotations: HashMap<String, String>,
pub parallelism: i32,
pub task_count: i32,
pub template: Option<TaskTemplate>,
/* private fields */
}Expand description
ExecutionTemplate describes the data an execution should have when created from a template.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.labels: HashMap<String, String>Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google’s billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.
annotations: HashMap<String, String>Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
parallelism: i32Optional. Specifies the maximum desired number of tasks the execution should run at given time. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism.
task_count: i32Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1.
template: Option<TaskTemplate>Required. Describes the task(s) that will be created when executing an execution.
Implementations§
Source§impl ExecutionTemplate
impl ExecutionTemplate
pub fn new() -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = ExecutionTemplate::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_parallelism<T: Into<i32>>(self, v: T) -> Self
pub fn set_parallelism<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_task_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_task_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_template<T>(self, v: T) -> Selfwhere
T: Into<TaskTemplate>,
pub fn set_template<T>(self, v: T) -> Selfwhere
T: Into<TaskTemplate>,
Sourcepub fn set_or_clear_template<T>(self, v: Option<T>) -> Selfwhere
T: Into<TaskTemplate>,
pub fn set_or_clear_template<T>(self, v: Option<T>) -> Selfwhere
T: Into<TaskTemplate>,
Trait Implementations§
Source§impl Clone for ExecutionTemplate
impl Clone for ExecutionTemplate
Source§fn clone(&self) -> ExecutionTemplate
fn clone(&self) -> ExecutionTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more