Skip to content

Commit f890352

Browse files
merge scheduler from private prototype repo.
1 parent fce7414 commit f890352

11 files changed

Lines changed: 427 additions & 11 deletions

File tree

Cargo.lock

Lines changed: 110 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "3"
3-
members = ["odorobo-agent", "odoroboctl", "shared"]
3+
members = ["odorobo-agent", "odoroboctl", "odorobo-scheduler", "odorobo-shared"]
44

55
[workspace.dependencies]
66
stable-eyre = "0.2.2"

odorobo-scheduler/Cargo.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "odorobo-scheduler"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[[bin]]
7+
name = "odorobo-scheduler"
8+
9+
[[bin]]
10+
name = "gen_openapi_spec"
11+
12+
[dependencies]
13+
kameo = { version = "0.19.2", features = ["remote"] }
14+
axum = { version = "0.8.8", features = ["tracing", "macros"] }
15+
env = "1.0.1"
16+
serde = { version = "1.0.228", features = ["derive"] }
17+
serde_json = "1.0.149"
18+
tokio = { version = "1.50.0", features = ["full"] } # TODO (june): tracing is only in tokio unstable? NOTE (caleb): I think that just refers to tokio logging tracing events, we can still make our own and look at other crate's events if necessary.
19+
tower-http = { version = "0.6.1", features = ["trace"] }
20+
tracing = "0.1.44"
21+
optional_struct = "0.5.2"
22+
tracing-subscriber = { version = "0.3.2", features = ["env-filter"] }
23+
uuid = { version = "1.23.0", features = ["serde"]}
24+
libp2p = { version = "0.56.0", features = ["yamux", "serde", "mdns"] }
25+
reqwest = { version = "0.13", features = ["json"] }
26+
ahash = { version = "0.8.12", features = ["serde"] }
27+
utoipa = { version = "5.4.0", features=["uuid"] }
28+
odorobo-shared = { path = "../odorobo-shared" }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use std::fs;
2+
use odorobo_scheduler::scheduler_actor::gen_openapi_spec;
3+
4+
fn main() -> std::io::Result<()> {
5+
let doc = gen_openapi_spec();
6+
fs::write("./openapi_spec.json", doc)
7+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use kameo::prelude::*;
2+
use odorobo_shared::utils::DynError;
3+
use odorobo_scheduler::scheduler_actor::SchedulerActor;
4+
use odorobo_shared::connect_to_swarm;
5+
6+
#[tokio::main]
7+
async fn main() -> Result<(), DynError> {
8+
let _local_peer_id = connect_to_swarm()?;
9+
10+
let actor_ref = SchedulerActor::spawn(SchedulerActor {});
11+
actor_ref.register("scheduler").await?;
12+
13+
actor_ref.wait_for_shutdown().await;
14+
15+
Ok(())
16+
}

odorobo-scheduler/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
pub mod scheduler_actor;

0 commit comments

Comments
 (0)