Skip to content

Commit

Permalink
fix: default replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin committed Aug 20, 2024
1 parent 7dfad13 commit c43e916
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub struct MachineSpec {
#[serde(default)]
pub cache_type: CacheType,

#[serde(default)]
#[serde(default = "default_replicas")]
pub replicas: u32,

#[serde(default)]
Expand All @@ -71,6 +71,10 @@ pub struct MachineSpec {
pub storage: StorageOptions,
}

fn default_replicas() -> u32 {
1
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit c43e916

Please sign in to comment.