pub struct ServiceTaskSpecPlacement {
pub constraints: Box<Option<Vec<String>>>,
pub max_replicas: Box<Option<i32>>,
pub platforms: Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>,
pub prefs: Box<Option<Vec<String>>>,
}
Fields§
§constraints: Box<Option<Vec<String>>>
An array of constraints. e.g.: node.role==manager
max_replicas: Box<Option<i32>>
Maximum number of replicas for per node (default value is 0
, which is unlimited)
platforms: Box<Option<Vec<ServiceTaskSpecPlacementPlatform>>>
Platforms stores all the platforms that the service’s image can run on
prefs: Box<Option<Vec<String>>>
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
Implementations§
source§impl ServiceTaskSpecPlacement
impl ServiceTaskSpecPlacement
sourcepub fn builder() -> ServiceTaskSpecPlacementBuilder
pub fn builder() -> ServiceTaskSpecPlacementBuilder
Create an instance of ServiceTaskSpecPlacement
using the builder syntax
Trait Implementations§
source§impl Debug for ServiceTaskSpecPlacement
impl Debug for ServiceTaskSpecPlacement
source§impl<'de> Deserialize<'de> for ServiceTaskSpecPlacement
impl<'de> Deserialize<'de> for ServiceTaskSpecPlacement
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
Auto Trait Implementations§
impl Freeze for ServiceTaskSpecPlacement
impl RefUnwindSafe for ServiceTaskSpecPlacement
impl Send for ServiceTaskSpecPlacement
impl Sync for ServiceTaskSpecPlacement
impl Unpin for ServiceTaskSpecPlacement
impl UnwindSafe for ServiceTaskSpecPlacement
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