Skip to content

Commit

Permalink
qdrant: introduce cluster dedicated-2 (#3475)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 29, 2024
1 parent 25d8088 commit ac3054d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/data_sources/qdrant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ pub enum QdrantCluster {
Dedicated0,
#[serde(rename = "dedicated-1")]
Dedicated1,
#[serde(rename = "dedicated-2")]
Dedicated2,
}

static QDRANT_CLUSTER_VARIANTS: &[QdrantCluster] = &[
QdrantCluster::Main0,
QdrantCluster::Dedicated0,
QdrantCluster::Dedicated1,
QdrantCluster::Dedicated2,
];

impl ToString for QdrantCluster {
Expand All @@ -30,6 +33,7 @@ impl ToString for QdrantCluster {
QdrantCluster::Main0 => String::from("main-0"),
QdrantCluster::Dedicated0 => String::from("dedicated-0"),
QdrantCluster::Dedicated1 => String::from("dedicated-1"),
QdrantCluster::Dedicated2 => String::from("dedicated-2"),
}
}
}
Expand All @@ -41,6 +45,7 @@ impl FromStr for QdrantCluster {
"main-0" => Ok(QdrantCluster::Main0),
"dedicated-0" => Ok(QdrantCluster::Dedicated0),
"dedicated-1" => Ok(QdrantCluster::Dedicated1),
"dedicated-2" => Ok(QdrantCluster::Dedicated2),
_ => Err(ParseError::with_message("Unknown QdrantCluster"))?,
}
}
Expand All @@ -51,6 +56,7 @@ pub fn env_var_prefix_for_cluster(cluster: QdrantCluster) -> &'static str {
QdrantCluster::Main0 => "QDRANT_MAIN_0",
QdrantCluster::Dedicated0 => "QDRANT_DEDICATED_0",
QdrantCluster::Dedicated1 => "QDRANT_DEDICATED_1",
QdrantCluster::Dedicated2 => "QDRANT_DEDICATED_2",
}
}

Expand Down

0 comments on commit ac3054d

Please sign in to comment.