summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2020-02-20 19:32:27 +0000
committerEmīls <emils@mullvad.net>2020-02-21 11:54:52 +0000
commit841eb1f16753f1e26a177fed8702dd62daceaddd (patch)
treea16aa6b4feb4a36e741595c9913ad183e01913de
parent24583dc4d94aad3c811bd2d7ee6e0752cebf91d3 (diff)
downloadmullvadvpn-841eb1f16753f1e26a177fed8702dd62daceaddd.tar.xz
mullvadvpn-841eb1f16753f1e26a177fed8702dd62daceaddd.zip
Fix docstrings in daemon's wireguard module
-rw-r--r--mullvad-daemon/src/wireguard.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/mullvad-daemon/src/wireguard.rs b/mullvad-daemon/src/wireguard.rs
index f91a02a977..7b6fdac006 100644
--- a/mullvad-daemon/src/wireguard.rs
+++ b/mullvad-daemon/src/wireguard.rs
@@ -71,9 +71,8 @@ impl KeyManager {
}
}
- /// Update automatic key rotation interval (given in minutes)
- /// Passing `None` for the interval will use the default value.
- /// A value of `0` disables automatic key rotation.
+ /// Reset key rotation, cancelling the current one and starting a new one for the specified
+ /// account
pub fn reset_rotation(
&mut self,
account_history: &mut AccountHistory,
@@ -123,6 +122,7 @@ impl KeyManager {
.map_err(Self::map_rpc_error)
}
+ /// Run a future on the given tokio remote
pub fn run_future_sync<T: Send + 'static, E: Send + 'static>(
&mut self,
fut: impl Future<Item = T, Error = E> + Send + 'static,
@@ -137,6 +137,7 @@ impl KeyManager {
rx.wait().unwrap()
}
+ /// Replace a key for an account synchronously
pub fn replace_key(
&mut self,
account: AccountToken,
@@ -153,7 +154,7 @@ impl KeyManager {
}
- /// Generate a new private key asyncronously. The new keys will be sent to the daemon channel.
+ /// Generate a new private key asynchronously. The new keys will be sent to the daemon channel.
pub fn generate_key_async(&mut self, account: AccountToken) -> Result<()> {
self.reset();
let private_key = PrivateKey::new_from_random();