Skip to content

Commit

Permalink
use re-exported libkaminari
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Jul 25, 2022
1 parent 56a7281 commit e69929d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
27 changes: 13 additions & 14 deletions Cargo.lock

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

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "realm"
version = "2.4.0"
version = "2.4.1"
authors = ["zhboner <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -29,7 +29,6 @@ path = "src/bin.rs"
realm_io = { path = "realm_io" }
realm_core = { path = "realm_core" }
realm_syscall = { path = "realm_syscall" }
kaminari = { version = "0.9.1", features = ["ws", "tls", "mix"], optional = true }

# common
cfg-if = "1"
Expand Down Expand Up @@ -60,13 +59,13 @@ jemallocator = { version = "0.5", optional = true }
env_logger = "0.9"
tokio = { version = "1", features = ["macros"] }


[features]
default = ["hook", "proxy", "balance", "multi-thread", "transport"]
hook = ["realm_core/hook"]
proxy = ["realm_core/proxy"]
balance = ["realm_core/balance"]
transport = ["kaminari", "realm_core/transport", "realm_core/transport-boost"]
transport = ["realm_core/transport", "realm_core/transport-boost"]
multi-thread = ["tokio/rt-multi-thread"]
brutal-shutdown = ["realm_io/brutal-shutdown"]
jemalloc = ["jemallocator"]
Expand Down
3 changes: 3 additions & 0 deletions realm_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ pub use realm_hook as hook;

#[cfg(feature = "balance")]
pub use realm_lb as balance;

#[cfg(feature = "transport")]
pub use kaminari;
10 changes: 5 additions & 5 deletions src/conf/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use realm_core::endpoint::{Endpoint, RemoteAddr};
use realm_core::balance::Balancer;

#[cfg(feature = "transport")]
use kaminari::mix::{MixAccept, MixConnect};
use realm_core::kaminari::mix::{MixAccept, MixConnect};

use super::{Config, NetConf, NetInfo};

Expand Down Expand Up @@ -99,10 +99,10 @@ impl EndpointConf {

#[cfg(feature = "transport")]
fn build_transport(&self) -> Option<(MixAccept, MixConnect)> {
use kaminari::mix::{MixClientConf, MixServerConf};
use kaminari::opt::get_ws_conf;
use kaminari::opt::get_tls_client_conf;
use kaminari::opt::get_tls_server_conf;
use realm_core::kaminari::mix::{MixClientConf, MixServerConf};
use realm_core::kaminari::opt::get_ws_conf;
use realm_core::kaminari::opt::get_tls_client_conf;
use realm_core::kaminari::opt::get_tls_server_conf;

let Self {
listen_transport,
Expand Down

0 comments on commit e69929d

Please sign in to comment.