feat(pool): add bulk key configuration management

This commit is contained in:
MMEXA
2026-07-14 04:57:05 +08:00
parent 7f61bb43c7
commit a25fab371a
37 changed files with 2510 additions and 379 deletions
@@ -512,6 +512,20 @@ impl GatewayDataState {
Ok(updated)
}
pub(crate) async fn update_provider_catalog_keys(
&self,
keys: &[StoredProviderCatalogKey],
) -> Result<Option<Vec<StoredProviderCatalogKey>>, DataLayerError> {
let updated = match &self.provider_catalog_writer {
Some(repository) => repository.update_keys(keys).await.map(Some),
None => Ok(None),
}?;
if updated.as_ref().is_some_and(|keys| !keys.is_empty()) {
self.clear_provider_catalog_cache();
}
Ok(updated)
}
pub(crate) async fn update_provider_catalog_key_upstream_metadata(
&self,
key_id: &str,