swarm-controller: move the accounts concern into its own module
Refs #6897
This commit is contained in:
parent
237cdaffaa
commit
9b2ba275d8
12 changed files with 22 additions and 15 deletions
|
|
@ -123,7 +123,7 @@ swarm-queue-client = { workspace = true, features = [
|
|||
"agent-term",
|
||||
"forge-events",
|
||||
] }
|
||||
# `matrix_account.rs` writes the credential this daemon's route accepts. Same
|
||||
# `accounts/matrix_account.rs` writes the credential this daemon's route accepts. Same
|
||||
# crate the hive reads it back with, which is the point: the path, the field
|
||||
# name and the object's shape are agreements between the two ends, and a
|
||||
# second spelling here would be a store this hive could not read.
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ mod tests {
|
|||
forge: std::sync::Arc::default(),
|
||||
create_gate: std::sync::Arc::default(),
|
||||
accounts: Accounts::Fake(Arc::clone(store)),
|
||||
try_outs: super::super::review_classifier::TryOuts::default(),
|
||||
try_outs: crate::review_classifier::TryOuts::default(),
|
||||
reviews: std::sync::Arc::default(),
|
||||
runs: crate::review_classifier::runs::Runs::Live(None),
|
||||
builds: crate::builder::runs::Builds::Live(None),
|
||||
|
|
@ -139,7 +139,7 @@ mod tests {
|
|||
forge: std::sync::Arc::default(),
|
||||
create_gate: std::sync::Arc::default(),
|
||||
accounts: Accounts::Fake(Arc::clone(store)),
|
||||
try_outs: super::super::review_classifier::TryOuts::default(),
|
||||
try_outs: crate::review_classifier::TryOuts::default(),
|
||||
reviews: std::sync::Arc::default(),
|
||||
runs: crate::review_classifier::runs::Runs::Live(None),
|
||||
builds: crate::builder::runs::Builds::Live(None),
|
||||
|
|
@ -230,7 +230,7 @@ mod tests {
|
|||
forge: std::sync::Arc::default(),
|
||||
create_gate: std::sync::Arc::default(),
|
||||
accounts: Accounts::Fake(Arc::clone(store)),
|
||||
try_outs: super::super::review_classifier::TryOuts::default(),
|
||||
try_outs: crate::review_classifier::TryOuts::default(),
|
||||
reviews: std::sync::Arc::default(),
|
||||
runs: crate::review_classifier::runs::Runs::Live(None),
|
||||
builds: crate::builder::runs::Builds::Live(None),
|
||||
|
|
@ -1255,7 +1255,7 @@ pub(crate) mod tests {
|
|||
forge: std::sync::Arc::default(),
|
||||
create_gate: std::sync::Arc::default(),
|
||||
accounts: super::Accounts::Fake(Arc::clone(store)),
|
||||
try_outs: super::super::review_classifier::TryOuts::default(),
|
||||
try_outs: crate::review_classifier::TryOuts::default(),
|
||||
reviews: std::sync::Arc::default(),
|
||||
runs: crate::review_classifier::runs::Runs::Live(None),
|
||||
builds: crate::builder::runs::Builds::Live(None),
|
||||
|
|
@ -479,7 +479,7 @@ mod tests {
|
|||
forge: std::sync::Arc::default(),
|
||||
create_gate: std::sync::Arc::default(),
|
||||
accounts: Accounts::Fake(Arc::clone(store)),
|
||||
try_outs: super::super::review_classifier::TryOuts::default(),
|
||||
try_outs: crate::review_classifier::TryOuts::default(),
|
||||
reviews: std::sync::Arc::default(),
|
||||
runs: crate::review_classifier::runs::Runs::Live(None),
|
||||
builds: crate::builder::runs::Builds::Live(None),
|
||||
9
swarm-controller/src/accounts/mod.rs
Normal file
9
swarm-controller/src/accounts/mod.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//! The accounts concern: the swarm's matrix accounts and the external accounts
|
||||
//! linked to it (forge, github, gitlab), with their egress and routes.
|
||||
|
||||
pub(crate) mod forge_account;
|
||||
pub(crate) mod github_account;
|
||||
pub(crate) mod gitlab_account;
|
||||
pub(crate) mod link_egress;
|
||||
pub(crate) mod linked_accounts;
|
||||
pub(crate) mod matrix_account;
|
||||
|
|
@ -23,6 +23,7 @@ use std::sync::{Arc, Mutex};
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
mod accounts;
|
||||
mod agent_archetype;
|
||||
mod agent_commands;
|
||||
mod agent_config_repo;
|
||||
|
|
@ -61,17 +62,11 @@ mod config_pr;
|
|||
mod egress_allow;
|
||||
mod egress_deny;
|
||||
mod forge;
|
||||
mod forge_account;
|
||||
mod forge_events;
|
||||
mod github_account;
|
||||
mod gitlab_account;
|
||||
mod held_deploys;
|
||||
mod inference;
|
||||
mod issue_report;
|
||||
mod jobq;
|
||||
mod link_egress;
|
||||
mod linked_accounts;
|
||||
mod matrix_account;
|
||||
mod message_stream;
|
||||
mod meta_build;
|
||||
mod meta_fanout;
|
||||
|
|
@ -101,8 +96,11 @@ mod vcs_metrics;
|
|||
mod wanted;
|
||||
mod webhook;
|
||||
|
||||
// The accounts and review modules keep their crate-root paths (`crate::matrix_account::…`).
|
||||
use accounts::{
|
||||
forge_account, github_account, gitlab_account, link_egress, linked_accounts, matrix_account,
|
||||
};
|
||||
use jobq::{Late, WorkerDeps, spawn_jobq_worker};
|
||||
// The review modules keep their crate-root paths (`crate::review_classifier::…`).
|
||||
use review::{notify_flows, notify_router_api, request_reviewer, review_classifier};
|
||||
use routes::AppState;
|
||||
use startup::{
|
||||
|
|
|
|||
Loading…
Reference in a new issue