pub struct ServiceTaskSpecPlacementBuilder<___State = __ServiceTaskSpecPlacementBuilderInitialState> { /* private fields */ }
Expand description
Use builder syntax to set the required parameters and finish by calling the method Self::build_struct()
.
Implementations§
source§impl<__Constraints, __MaxReplicas, __Platforms, __Prefs> ServiceTaskSpecPlacementBuilder<(__Constraints, __MaxReplicas, __Platforms, __Prefs)>
impl<__Constraints, __MaxReplicas, __Platforms, __Prefs> ServiceTaskSpecPlacementBuilder<(__Constraints, __MaxReplicas, __Platforms, __Prefs)>
sourcepub fn build_struct(self) -> ServiceTaskSpecPlacementwhere
__Constraints: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecPlacementBuilder__constraints>,
__MaxReplicas: IntoSet<Option<Box<Option<i32>>>, ServiceTaskSpecPlacementBuilder__max_replicas>,
__Platforms: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>, ServiceTaskSpecPlacementBuilder__platforms>,
__Prefs: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecPlacementBuilder__prefs>,
pub fn build_struct(self) -> ServiceTaskSpecPlacementwhere
__Constraints: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecPlacementBuilder__constraints>,
__MaxReplicas: IntoSet<Option<Box<Option<i32>>>, ServiceTaskSpecPlacementBuilder__max_replicas>,
__Platforms: IntoSet<Option<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>, ServiceTaskSpecPlacementBuilder__platforms>,
__Prefs: IntoSet<Option<Box<Option<Vec<String>>>>, ServiceTaskSpecPlacementBuilder__prefs>,
Finishes building and returns the requested object.
sourcepub fn maybe_constraints(
self,
value: Option<impl Into<Box<Option<Vec<String>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Constraintswhere
__Constraints: IsUnset,
pub fn maybe_constraints(
self,
value: Option<impl Into<Box<Option<Vec<String>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Constraintswhere
__Constraints: IsUnset,
Same as [Self::r#constraints
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn constraints(
self,
value: impl Into<Box<Option<Vec<String>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Constraintswhere
__Constraints: IsUnset,
pub fn constraints(
self,
value: impl Into<Box<Option<Vec<String>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Constraintswhere
__Constraints: IsUnset,
An array of constraints. e.g.: node.role==manager
sourcepub fn maybe_max_replicas(
self,
value: Option<impl Into<Box<Option<i32>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::MaxReplicaswhere
__MaxReplicas: IsUnset,
pub fn maybe_max_replicas(
self,
value: Option<impl Into<Box<Option<i32>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::MaxReplicaswhere
__MaxReplicas: IsUnset,
Same as [Self::r#max_replicas
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn max_replicas(
self,
value: impl Into<Box<Option<i32>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::MaxReplicaswhere
__MaxReplicas: IsUnset,
pub fn max_replicas(
self,
value: impl Into<Box<Option<i32>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::MaxReplicaswhere
__MaxReplicas: IsUnset,
Maximum number of replicas for per node (default value is 0
, which is unlimited)
sourcepub fn maybe_platforms(
self,
value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Platformswhere
__Platforms: IsUnset,
pub fn maybe_platforms(
self,
value: Option<impl Into<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Platformswhere
__Platforms: IsUnset,
Same as [Self::r#platforms
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn platforms(
self,
value: impl Into<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Platformswhere
__Platforms: IsUnset,
pub fn platforms(
self,
value: impl Into<Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Platformswhere
__Platforms: IsUnset,
Platforms stores all the platforms that the service’s image can run on
sourcepub fn maybe_prefs(
self,
value: Option<impl Into<Box<Option<Vec<String>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Prefswhere
__Prefs: IsUnset,
pub fn maybe_prefs(
self,
value: Option<impl Into<Box<Option<Vec<String>>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Prefswhere
__Prefs: IsUnset,
Same as [Self::r#prefs
], but accepts an Option
as input. See that method’s documentation for more details.
sourcepub fn prefs(
self,
value: impl Into<Box<Option<Vec<String>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Prefswhere
__Prefs: IsUnset,
pub fn prefs(
self,
value: impl Into<Box<Option<Vec<String>>>>,
) -> <Self as __ServiceTaskSpecPlacementBuilderSetMember>::Prefswhere
__Prefs: IsUnset,
Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager