Browse Source

Extract get_cert

master
Adrian Heine 3 years ago
parent
commit
ffd85372d3
  1. 12
      src/symbols/factory.rs

12
src/symbols/factory.rs

@ -59,9 +59,13 @@ impl<'b, C: 'b + CommandRunner, P: 'b + Policy> SymbolFactory<'b, C, P> {
}
}
pub fn get_nginx_acme_server<'a, 'c: 'a, S: 'a + Symbol>(
&'c self,
host: &'static str,
pub fn get_cert<'a, H: 'a + AsRef<str> + Clone>(&'a self, host: H) -> impl Symbol + 'a {
self.acme_factory.get_cert(host)
}
pub fn get_nginx_acme_server<'a, S: 'a + Symbol>(
&'a self,
host: &'a str,
nginx_server_symbol: S,
) -> impl Symbol + 'a {
List::from((
@ -71,7 +75,7 @@ impl<'b, C: 'b + CommandRunner, P: 'b + Policy> SymbolFactory<'b, C, P> {
ReloadService::new("nginx", self.command_runner),
),
Hook::new(
self.acme_factory.get_cert(host),
self.get_cert(host),
ReloadService::new("nginx", self.command_runner),
),
))

Loading…
Cancel
Save