mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
refactor: 拆分 gateway 单体为独立 crate,新增 systemd 部署方案
将 gateway 内部的 model-fetch、provider-transport、scheduler-core、 usage-runtime、video-tasks-core 模块提取为独立 crate;重构 gateway 内部模块结构(state/router/cache/data/query 等);移除大量遗留模块 文件;新增 systemd 二进制部署骨架及相关文档;更新前端 usage 相关 API 和组件。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use http::Uri;
|
||||
|
||||
use super::{classify_control_route, headers};
|
||||
use crate::tunnel::TUNNEL_ROUTE_FAMILY;
|
||||
|
||||
#[test]
|
||||
fn classifies_internal_tunnel_heartbeat_as_internal_proxy_route() {
|
||||
@@ -12,10 +13,7 @@ fn classifies_internal_tunnel_heartbeat_as_internal_proxy_route() {
|
||||
classify_control_route(&http::Method::POST, &uri, &headers).expect("route should classify");
|
||||
|
||||
assert_eq!(decision.route_class.as_deref(), Some("internal_proxy"));
|
||||
assert_eq!(
|
||||
decision.route_family.as_deref(),
|
||||
Some(crate::gateway::TUNNEL_ROUTE_FAMILY)
|
||||
);
|
||||
assert_eq!(decision.route_family.as_deref(), Some(TUNNEL_ROUTE_FAMILY));
|
||||
assert_eq!(decision.route_kind.as_deref(), Some("heartbeat"));
|
||||
assert_eq!(decision.auth_endpoint_signature.as_deref(), Some(""));
|
||||
assert!(!decision.is_execution_runtime_candidate());
|
||||
@@ -47,10 +45,7 @@ fn classifies_internal_tunnel_node_status_as_internal_proxy_route() {
|
||||
classify_control_route(&http::Method::POST, &uri, &headers).expect("route should classify");
|
||||
|
||||
assert_eq!(decision.route_class.as_deref(), Some("internal_proxy"));
|
||||
assert_eq!(
|
||||
decision.route_family.as_deref(),
|
||||
Some(crate::gateway::TUNNEL_ROUTE_FAMILY)
|
||||
);
|
||||
assert_eq!(decision.route_family.as_deref(), Some(TUNNEL_ROUTE_FAMILY));
|
||||
assert_eq!(decision.route_kind.as_deref(), Some("node_status"));
|
||||
assert_eq!(decision.auth_endpoint_signature.as_deref(), Some(""));
|
||||
assert!(!decision.is_execution_runtime_candidate());
|
||||
|
||||
Reference in New Issue
Block a user