MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / renew_cert

Method renew_cert

gateway/src/main_service.rs:340–356  ·  view source on GitHub ↗

Renew a specific domain certificate or all domains

(&self, domain: Option<&str>, force: bool)

Source from the content-addressed store, hash-verified

338
339 /// Renew a specific domain certificate or all domains
340 pub(crate) async fn renew_cert(&self, domain: Option<&str>, force: bool) -> Result<bool> {
341 match domain {
342 Some(domain) => self
343 .certbot
344 .try_renew(domain, force)
345 .await
346 .context("failed to renew cert"),
347 None => {
348 // Renew all domains
349 self.certbot
350 .try_renew_all()
351 .await
352 .context("failed to renew all certs")?;
353 Ok(true)
354 }
355 }
356 }
357
358 /// Get ACME info for all managed domains (or a specific domain)
359 pub(crate) fn acme_info(&self, domain: Option<&str>) -> Result<AcmeInfoResponse> {

Callers 1

start_certbot_taskFunction · 0.45

Calls 2

try_renewMethod · 0.80
try_renew_allMethod · 0.80

Tested by

no test coverage detected