From 6b3408662c9d3a4c27c6883f7bd1f88e60981094 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 11 Jan 2018 17:07:50 +0100 Subject: store: Periodically update keys from the network. - Update all keys stored in a store with network policy 'encrypted' and 'insecure' periodically using the SKS keyserver pool. - Slightly amend the net::ipc interface so that servers can spawn futures on the reactor. - As a background service cannot directly communicate failures, this patch adds a logging mechanism. - In sq, display the key update timestamp, and the status of the last update. --- net/src/ipc.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/src/ipc.rs b/net/src/ipc.rs index fef222ad..7bbb529e 100644 --- a/net/src/ipc.rs +++ b/net/src/ipc.rs @@ -65,7 +65,8 @@ pub trait Handler { } /// A factory for handlers. -pub type HandlerFactory = fn(descriptor: Descriptor) -> Option>; +pub type HandlerFactory = fn(descriptor: Descriptor, + handle: tokio_core::reactor::Handle) -> Option>; /// A descriptor is used to connect to a service. #[derive(Clone)] @@ -231,7 +232,7 @@ impl Server { /* XXX: It'd be nice to recycle this connection. */ drop(i); - let handler = (self.descriptor.factory)(self.descriptor.clone()) + let handler = (self.descriptor.factory)(self.descriptor.clone(), self.core.handle()) .ok_or( io::Error::new(io::ErrorKind::BrokenPipe, "Failed to start server"))?; -- cgit v1.2.3