Skip to content

Commit 06aeead

Browse files
authored
fix unreachable_pub for orchestrator (#614)
1 parent eaf2d8d commit 06aeead

File tree

28 files changed

+88
-95
lines changed

28 files changed

+88
-95
lines changed

crates/orchestrator/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name = "orchestrator"
33
version.workspace = true
44
edition.workspace = true
55

6+
[lints]
7+
workspace = true
8+
69
[dependencies]
710
actix-web = { workspace = true }
811
actix-web-prometheus = "0.1.2"
@@ -35,4 +38,4 @@ iroh = { workspace = true }
3538
rand_v8 = { workspace = true }
3639

3740
[dev-dependencies]
38-
mockito = { workspace = true }
41+
mockito = { workspace = true }

crates/orchestrator/src/api/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pub mod routes;
2-
pub mod server;
3-
pub mod tests;
1+
pub(crate) mod routes;
2+
pub(crate) mod server;
3+
pub(crate) mod tests;

crates/orchestrator/src/api/routes/groups.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ async fn force_regroup(
371371
}
372372
}
373373

374-
pub fn groups_routes() -> Scope {
374+
pub(crate) fn groups_routes() -> Scope {
375375
web::scope("/groups")
376376
.route("", get().to(get_groups))
377377
.route("/configs", get().to(get_configurations))

crates/orchestrator/src/api/routes/heartbeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async fn heartbeat(
172172
}
173173
}
174174

175-
pub fn heartbeat_routes() -> Scope {
175+
pub(crate) fn heartbeat_routes() -> Scope {
176176
web::scope("/heartbeat").route("", post().to(heartbeat))
177177
}
178178

crates/orchestrator/src/api/routes/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async fn delete_metric(
153153
}))
154154
}
155155

156-
pub fn metrics_routes() -> Scope {
156+
pub(crate) fn metrics_routes() -> Scope {
157157
web::scope("/metrics")
158158
.route("", get().to(get_metrics))
159159
.route("/all", get().to(get_all_metrics))
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pub mod groups;
2-
pub mod heartbeat;
3-
pub mod metrics;
4-
pub mod nodes;
5-
pub mod storage;
6-
pub mod task;
1+
pub(crate) mod groups;
2+
pub(crate) mod heartbeat;
3+
pub(crate) mod metrics;
4+
pub(crate) mod nodes;
5+
pub(crate) mod storage;
6+
pub(crate) mod task;

crates/orchestrator/src/api/routes/nodes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ async fn ban_node(node_id: web::Path<String>, app_state: Data<AppState>) -> Http
392392
}
393393
}
394394

395-
pub fn nodes_routes() -> Scope {
395+
pub(crate) fn nodes_routes() -> Scope {
396396
web::scope("/nodes")
397397
.route("", get().to(get_nodes))
398398
.route("/{node_id}/restart", post().to(restart_node_task))

crates/orchestrator/src/api/routes/storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ async fn request_upload(
308308
}
309309
}
310310

311-
pub fn storage_routes() -> Scope {
311+
pub(crate) fn storage_routes() -> Scope {
312312
web::scope("/storage").route("/request-upload", post().to(request_upload))
313313
}
314314

crates/orchestrator/src/api/routes/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async fn delete_all_tasks(app_state: Data<AppState>) -> HttpResponse {
124124
HttpResponse::Ok().json(json!({"success": true}))
125125
}
126126

127-
pub fn tasks_routes() -> Scope {
127+
pub(crate) fn tasks_routes() -> Scope {
128128
web::scope("/tasks")
129129
.route("", get().to(get_all_tasks))
130130
.route("", post().to(create_task))

crates/orchestrator/src/api/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async fn health_check(data: web::Data<AppState>) -> HttpResponse {
115115
}
116116
}
117117

118-
pub struct AppState {
118+
pub(crate) struct AppState {
119119
pub store_context: Arc<StoreContext>,
120120
pub storage_provider: Option<Arc<dyn StorageProvider>>,
121121
pub heartbeats: Arc<LoopHeartbeats>,

0 commit comments

Comments
 (0)