Skip to content

Commit 055e8e2

Browse files
committed
add new ott-balancer-bin that just calls in to the ott-balancer crate
1 parent 6db69b0 commit 055e8e2

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

Cargo.lock

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ hyper-util = { git = "https://github.com/hyperium/hyper-util.git", rev = "f89801
1717
http-body-util = "0.1.0-rc.2"
1818
once_cell = "1.17.1"
1919
ott-common = { path = "crates/ott-common" }
20+
ott-balancer = { path = "crates/ott-balancer" }
2021
ott-balancer-protocol = { path = "crates/ott-balancer-protocol" }
2122
pin-project = "1.0.12"
2223
prometheus = { version = "0.13.3", features = ["process"] }

crates/ott-balancer-bin/Cargo.toml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "ott-balancer-bin"
3+
version = "0.7.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
anyhow.workspace = true
8+
ott-balancer.workspace = true
9+
tokio.workspace = true

crates/ott-balancer-bin/src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[tokio::main]
2+
async fn main() -> anyhow::Result<()> {
3+
ott_balancer::run().await
4+
}

crates/ott-balancer/src/main.rs renamed to crates/ott-balancer/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ mod monolith;
2525
mod room;
2626
mod service;
2727

28-
#[tokio::main]
29-
async fn main() -> anyhow::Result<()> {
28+
pub async fn run() -> anyhow::Result<()> {
3029
let args = config::Cli::parse();
3130

3231
BalancerConfig::load(&args.config_path)?;

0 commit comments

Comments
 (0)