v0.25.5
This commit is contained in:
1 parent
1dea7f55c8
commit
c819f0a335
151 files changed
+7610
-4264
No files matched your search
@@ -11,9 +11,15 @@ impl App {
|
||||
/// resolver is rebuilt as one validated snapshot, so the requested pair is
|
||||
/// re-read atomically with the other configured pairs while desired
|
||||
/// configuration and its revision remain unchanged.
|
||||
pub async fn reload_certificate(self: &Arc<Self>, certificate_id: &str) -> Result<u64, ApiError> {
|
||||
pub async fn reload_certificate(
|
||||
self: &Arc<Self>,
|
||||
certificate_id: &str,
|
||||
) -> Result<u64, ApiError> {
|
||||
if !crate::config::valid_id(certificate_id) {
|
||||
return Err(ApiError(StatusCode::NOT_FOUND, "certificate not found".into()));
|
||||
return Err(ApiError(
|
||||
StatusCode::NOT_FOUND,
|
||||
"certificate not found".into(),
|
||||
));
|
||||
}
|
||||
self.reload_certificate_snapshot(Some(certificate_id)).await
|
||||
}
|
||||
@@ -72,11 +78,14 @@ impl App {
|
||||
.map_err(|error| ApiError(StatusCode::UNPROCESSABLE_ENTITY, format!("{error:#}")))?;
|
||||
self.config.store(Arc::new(prepared));
|
||||
if let Some(certificate_id) = certificate_id {
|
||||
tracing::info!(revision, certificate_id, "configured certificate reloaded from disk");
|
||||
tracing::info!(
|
||||
revision,
|
||||
certificate_id,
|
||||
"configured certificate reloaded from disk"
|
||||
);
|
||||
} else {
|
||||
tracing::info!(revision, "configured certificates reloaded from disk");
|
||||
}
|
||||
Ok(revision)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,7 +29,8 @@ impl App {
|
||||
actor: String,
|
||||
source_revision: u64,
|
||||
) -> Result<config::Envelope, ApiError> {
|
||||
self.update_as_action(update, actor, Some(source_revision)).await
|
||||
self.update_as_action(update, actor, Some(source_revision))
|
||||
.await
|
||||
}
|
||||
async fn update_as_action(
|
||||
self: &Arc<Self>,
|
||||
@@ -155,5 +156,4 @@ impl App {
|
||||
)
|
||||
})?
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user