#[non_exhaustive]pub struct ExecutionConfig {
pub usages: Vec<ExecutionEnvironmentUsage>,
pub worker_pool: String,
pub service_account: String,
pub artifact_storage: String,
pub execution_timeout: Option<Duration>,
pub verbose: bool,
pub execution_environment: Option<ExecutionEnvironment>,
/* private fields */
}Expand description
Configuration of the environment to use when calling Skaffold.
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.usages: Vec<ExecutionEnvironmentUsage>Required. Usages when this configuration should be applied.
worker_pool: StringOptional. The resource name of the WorkerPool, with the format
projects/{project}/locations/{location}/workerPools/{worker_pool}.
If this optional field is unspecified, the default Cloud Build pool will be
used.
service_account: StringOptional. Google service account to use for execution. If unspecified, the project execution service account (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) is used.
artifact_storage: StringOptional. Cloud Storage location in which to store execution outputs. This can either be a bucket (“gs://my-bucket”) or a path within a bucket (“gs://my-bucket/my-dir”). If unspecified, a default bucket located in the same region will be used.
execution_timeout: Option<Duration>Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
verbose: boolOptional. If true, additional logging will be enabled when running builds in this execution environment.
execution_environment: Option<ExecutionEnvironment>Details of the environment.
Implementations§
Source§impl ExecutionConfig
impl ExecutionConfig
pub fn new() -> Self
Sourcepub fn set_usages<T, V>(self, v: T) -> Self
pub fn set_usages<T, V>(self, v: T) -> Self
Sourcepub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
pub fn set_worker_pool<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = ExecutionConfig::new().set_service_account("example");Sourcepub fn set_artifact_storage<T: Into<String>>(self, v: T) -> Self
pub fn set_artifact_storage<T: Into<String>>(self, v: T) -> Self
Sets the value of artifact_storage.
§Example
let x = ExecutionConfig::new().set_artifact_storage("example");Sourcepub fn set_execution_timeout<T>(self, v: T) -> Self
pub fn set_execution_timeout<T>(self, v: T) -> Self
Sets the value of execution_timeout.
§Example
use wkt::Duration;
let x = ExecutionConfig::new().set_execution_timeout(Duration::default()/* use setters */);Sourcepub fn set_or_clear_execution_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_execution_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of execution_timeout.
§Example
use wkt::Duration;
let x = ExecutionConfig::new().set_or_clear_execution_timeout(Some(Duration::default()/* use setters */));
let x = ExecutionConfig::new().set_or_clear_execution_timeout(None::<Duration>);Sourcepub fn set_verbose<T: Into<bool>>(self, v: T) -> Self
pub fn set_verbose<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_execution_environment<T: Into<Option<ExecutionEnvironment>>>(
self,
v: T,
) -> Self
pub fn set_execution_environment<T: Into<Option<ExecutionEnvironment>>>( self, v: T, ) -> Self
Sets the value of execution_environment.
Note that all the setters affecting execution_environment are mutually
exclusive.
§Example
use google_cloud_deploy_v1::model::DefaultPool;
let x = ExecutionConfig::new().set_execution_environment(Some(
google_cloud_deploy_v1::model::execution_config::ExecutionEnvironment::DefaultPool(DefaultPool::default().into())));Sourcepub fn default_pool(&self) -> Option<&Box<DefaultPool>>
pub fn default_pool(&self) -> Option<&Box<DefaultPool>>
The value of execution_environment
if it holds a DefaultPool, None if the field is not set or
holds a different branch.
Sourcepub fn set_default_pool<T: Into<Box<DefaultPool>>>(self, v: T) -> Self
pub fn set_default_pool<T: Into<Box<DefaultPool>>>(self, v: T) -> Self
Sets the value of execution_environment
to hold a DefaultPool.
Note that all the setters affecting execution_environment are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::DefaultPool;
let x = ExecutionConfig::new().set_default_pool(DefaultPool::default()/* use setters */);
assert!(x.default_pool().is_some());
assert!(x.private_pool().is_none());Sourcepub fn private_pool(&self) -> Option<&Box<PrivatePool>>
pub fn private_pool(&self) -> Option<&Box<PrivatePool>>
The value of execution_environment
if it holds a PrivatePool, None if the field is not set or
holds a different branch.
Sourcepub fn set_private_pool<T: Into<Box<PrivatePool>>>(self, v: T) -> Self
pub fn set_private_pool<T: Into<Box<PrivatePool>>>(self, v: T) -> Self
Sets the value of execution_environment
to hold a PrivatePool.
Note that all the setters affecting execution_environment are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::PrivatePool;
let x = ExecutionConfig::new().set_private_pool(PrivatePool::default()/* use setters */);
assert!(x.private_pool().is_some());
assert!(x.default_pool().is_none());Trait Implementations§
Source§impl Clone for ExecutionConfig
impl Clone for ExecutionConfig
Source§fn clone(&self) -> ExecutionConfig
fn clone(&self) -> ExecutionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more