-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Daniel-Boll/feature/1-implement-optional-c…
…ompression-methods-in-cluster-constructor Implement optional compression methods in cluster constructor
- Loading branch information
Showing
9 changed files
with
1,128 additions
and
2,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use crate::cluster::{execution_profile::ExecutionProfile, config::compression::Compression}; | ||
|
||
#[napi(object)] | ||
pub struct ClusterConfig { | ||
pub nodes: Vec<String>, | ||
pub compression: Option<Compression>, | ||
pub default_execution_profile: Option<ExecutionProfile>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use napi::bindgen_prelude::*; | ||
|
||
#[napi] | ||
pub enum Compression { | ||
None, | ||
Lz4, | ||
Snappy | ||
} | ||
|
||
impl From<Compression> for Option<scylla::transport::Compression> { | ||
fn from(value: Compression)-> Self { | ||
match value { | ||
Compression::None => None, | ||
Compression::Lz4 => Some(scylla::transport::Compression::Lz4), | ||
Compression::Snappy => Some(scylla::transport::Compression::Snappy) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod cluster_config; | ||
pub mod compression; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod cluster_config; | ||
pub mod execution_profile; | ||
pub mod scylla_cluster; | ||
pub mod config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.