Extract get_cert
This commit is contained in:
parent
51b47b5dd4
commit
ffd85372d3
1 changed files with 8 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue