Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
add redis client
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Sep 16, 2020
1 parent 04c9624 commit 25424b9
Show file tree
Hide file tree
Showing 11 changed files with 959 additions and 10 deletions.
14 changes: 11 additions & 3 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/xaynet-core/src/crypto/encrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use super::ByteObject;
/// Number of additional bytes in a ciphertext compared to the corresponding plaintext.
pub const SEALBYTES: usize = sealedbox::SEALBYTES;

#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
/// A `C25519` key pair for asymmetric authenticated encryption.
pub struct EncryptKeyPair {
/// The `C25519` public key.
Expand Down
2 changes: 1 addition & 1 deletion rust/xaynet-core/src/mask/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::mask::config::MaskConfig;
/// Errors related to invalid mask objects.
pub struct InvalidMaskObjectError;

#[derive(Debug, Hash, PartialEq, Eq, Clone)]
#[derive(Debug, Hash, PartialEq, Eq, Clone, Serialize, Deserialize)]
/// A mask object which represents either a mask or a masked model.
pub struct MaskObject {
pub data: Vec<BigUint>,
Expand Down
2 changes: 1 addition & 1 deletion rust/xaynet-core/src/mask/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl MaskSeed {
}
}

#[derive(AsRef, AsMut, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[derive(AsRef, AsMut, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
/// An encrypted mask seed.
pub struct EncryptedMaskSeed(Vec<u8>);

Expand Down
4 changes: 2 additions & 2 deletions rust/xaynet-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ config = "0.10.1"
validator = "0.10"
validator_derive = "0.10"
structopt = "0.3"
paste = "0.1.15"
paste = "1.0.0"
tower = "0.3.1"
tracing = "0.1.16"
tracing-futures = "0.2.4"
Expand All @@ -55,7 +55,7 @@ rayon = "1.3.0"
async-trait = "0.1.35"
xaynet-macros = { path = "../xaynet-macros" }
xaynet-core = { path = "../xaynet-core" }
redis = { version = "0.17.0", default-features = false, features = ["tokio-rt-core"] }
redis = { version = "0.17.0", default-features = false, features = ["connection-manager", "aio", "tokio-rt-core"] }

# optional dependencies
influxdb = { version = "0.1.0", features = ["derive"], optional = true }
Expand Down
1 change: 1 addition & 0 deletions rust/xaynet-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub mod rest;
pub mod services;
pub mod settings;
pub mod state_machine;
pub mod storage;
pub mod utils;
pub(crate) mod vendor;

Expand Down
2 changes: 1 addition & 1 deletion rust/xaynet-server/src/state_machine/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use xaynet_core::{
use crate::settings::{MaskSettings, ModelSettings, PetSettings};

/// The coordinator state.
#[derive(Debug)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CoordinatorState {
/// The credentials of the coordinator.
pub keys: EncryptKeyPair,
Expand Down
2 changes: 1 addition & 1 deletion rust/xaynet-server/src/state_machine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ where
}

#[cfg(test)]
mod tests;
pub(crate) mod tests;
Loading

0 comments on commit 25424b9

Please sign in to comment.