#[non_exhaustive]pub struct SlurmNodeSet {
pub id: String,
pub compute_id: String,
pub storage_configs: Vec<StorageConfig>,
pub static_node_count: i64,
pub max_dynamic_node_count: i64,
pub type: Option<Type>,
/* private fields */
}Expand description
Configuration for Slurm nodesets in the cluster. Nodesets are groups of compute nodes used by Slurm that are responsible for running workloads submitted to the cluster.
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.id: StringRequired. Identifier for the nodeset, which allows it to be referenced by partitions. Must conform to RFC-1034 (lower-case, alphanumeric, and at most 63 characters).
compute_id: StringOptional. ID of the compute resource on which this nodeset will run. Must match a key in the cluster’s compute_resources.
storage_configs: Vec<StorageConfig>Optional. How storage resources should be mounted on each compute node.
static_node_count: i64Optional. Number of nodes to be statically created for this nodeset. The cluster will attempt to ensure that at least this many nodes exist at all times.
max_dynamic_node_count: i64Optional. Controls how many additional nodes a cluster can bring online to handle workloads. Set this value to enable dynamic node creation and limit the number of additional nodes the cluster can bring online. Leave empty if you do not want the cluster to create nodes dynamically, and instead rely only on static nodes.
type: Option<Type>Additional configuration for the nodeset. If not set, the nodeset will use ComputeInstanceSlurmNodeSet with default values.
Implementations§
Source§impl SlurmNodeSet
impl SlurmNodeSet
Sourcepub fn set_compute_id<T: Into<String>>(self, v: T) -> Self
pub fn set_compute_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_storage_configs<T, V>(self, v: T) -> Self
pub fn set_storage_configs<T, V>(self, v: T) -> Self
Sets the value of storage_configs.
§Example
use google_cloud_hypercomputecluster_v1::model::StorageConfig;
let x = SlurmNodeSet::new()
.set_storage_configs([
StorageConfig::default()/* use setters */,
StorageConfig::default()/* use (different) setters */,
]);Sourcepub fn set_static_node_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_static_node_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of static_node_count.
§Example
let x = SlurmNodeSet::new().set_static_node_count(42);Sourcepub fn set_max_dynamic_node_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_max_dynamic_node_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of max_dynamic_node_count.
§Example
let x = SlurmNodeSet::new().set_max_dynamic_node_count(42);Sourcepub fn set_type<T: Into<Option<Type>>>(self, v: T) -> Self
pub fn set_type<T: Into<Option<Type>>>(self, v: T) -> Self
Sets the value of r#type.
Note that all the setters affecting r#type are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::ComputeInstanceSlurmNodeSet;
let x = SlurmNodeSet::new().set_type(Some(
google_cloud_hypercomputecluster_v1::model::slurm_node_set::Type::ComputeInstance(ComputeInstanceSlurmNodeSet::default().into())));Sourcepub fn compute_instance(&self) -> Option<&Box<ComputeInstanceSlurmNodeSet>>
pub fn compute_instance(&self) -> Option<&Box<ComputeInstanceSlurmNodeSet>>
The value of [r#type][crate::model::SlurmNodeSet::r#type]
if it holds a ComputeInstance, None if the field is not set or
holds a different branch.
Sourcepub fn set_compute_instance<T: Into<Box<ComputeInstanceSlurmNodeSet>>>(
self,
v: T,
) -> Self
pub fn set_compute_instance<T: Into<Box<ComputeInstanceSlurmNodeSet>>>( self, v: T, ) -> Self
Sets the value of [r#type][crate::model::SlurmNodeSet::r#type]
to hold a ComputeInstance.
Note that all the setters affecting r#type are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::ComputeInstanceSlurmNodeSet;
let x = SlurmNodeSet::new().set_compute_instance(ComputeInstanceSlurmNodeSet::default()/* use setters */);
assert!(x.compute_instance().is_some());Trait Implementations§
Source§impl Clone for SlurmNodeSet
impl Clone for SlurmNodeSet
Source§impl Debug for SlurmNodeSet
impl Debug for SlurmNodeSet
Source§impl Default for SlurmNodeSet
impl Default for SlurmNodeSet
Source§impl Message for SlurmNodeSet
impl Message for SlurmNodeSet
Source§impl PartialEq for SlurmNodeSet
impl PartialEq for SlurmNodeSet
impl StructuralPartialEq for SlurmNodeSet
Auto Trait Implementations§
impl Freeze for SlurmNodeSet
impl RefUnwindSafe for SlurmNodeSet
impl Send for SlurmNodeSet
impl Sync for SlurmNodeSet
impl Unpin for SlurmNodeSet
impl UnsafeUnpin for SlurmNodeSet
impl UnwindSafe for SlurmNodeSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request