Version: 0.9.69.dev.260504
后端: 1. 阶段 4 active-scheduler 服务边界落地,新增 `cmd/active-scheduler`、`services/active_scheduler`、`shared/contracts/activescheduler` 和 active-scheduler port,迁移 dry-run、trigger、preview、confirm zrpc 能力 2. active-scheduler outbox consumer、relay、retry loop 和 due job scanner 迁入独立服务入口,gateway `/active-schedule/*` 改为通过 zrpc client 调用 3. gateway 目录收口为 `gateway/api` + `gateway/client`,统一归档 userauth、notification、active-scheduler 的 HTTP 门面和 zrpc client 4. 将旧 `backend/active_scheduler` 领域核心下沉到 `services/active_scheduler/core`,清退旧根目录活跃实现,并补充 active-scheduler 启动期跨域依赖表检查 5. 调整单体启动与 outbox 归属,`cmd/all` 不再启动 active-scheduler workflow、scanner 或 handler 文档: 1. 更新微服务迁移计划,将阶段 4 active-scheduler 标记为首轮收口完成,并明确下一阶段进入 schedule / task / course / task-class
This commit is contained in:
53
backend/services/active_scheduler/rpc/active_scheduler.proto
Normal file
53
backend/services/active_scheduler/rpc/active_scheduler.proto
Normal file
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package smartflow.active_scheduler;
|
||||
|
||||
option go_package = "github.com/LoveLosita/smartflow/backend/services/active_scheduler/rpc/pb";
|
||||
|
||||
service ActiveScheduler {
|
||||
rpc DryRun(ActiveScheduleRequest) returns (JSONResponse);
|
||||
rpc Trigger(ActiveScheduleRequest) returns (TriggerResponse);
|
||||
rpc CreatePreview(ActiveScheduleRequest) returns (JSONResponse);
|
||||
rpc GetPreview(GetPreviewRequest) returns (JSONResponse);
|
||||
rpc ConfirmPreview(ConfirmPreviewRequest) returns (JSONResponse);
|
||||
}
|
||||
|
||||
message ActiveScheduleRequest {
|
||||
int64 user_id = 1;
|
||||
string trigger_type = 2;
|
||||
string target_type = 3;
|
||||
int64 target_id = 4;
|
||||
string feedback_id = 5;
|
||||
string idempotency_key = 6;
|
||||
int64 mock_now_unix_nano = 7;
|
||||
bytes payload_json = 8;
|
||||
}
|
||||
|
||||
message GetPreviewRequest {
|
||||
int64 user_id = 1;
|
||||
string preview_id = 2;
|
||||
}
|
||||
|
||||
message ConfirmPreviewRequest {
|
||||
int64 user_id = 1;
|
||||
string preview_id = 2;
|
||||
string candidate_id = 3;
|
||||
string action = 4;
|
||||
bytes edited_changes_json = 5;
|
||||
string idempotency_key = 6;
|
||||
int64 requested_at_unix_nano = 7;
|
||||
string trace_id = 8;
|
||||
}
|
||||
|
||||
message JSONResponse {
|
||||
bytes data_json = 1;
|
||||
}
|
||||
|
||||
message TriggerResponse {
|
||||
string trigger_id = 1;
|
||||
string status = 2;
|
||||
string preview_id = 3;
|
||||
bool has_preview_id = 4;
|
||||
bool dedupe_hit = 5;
|
||||
string trace_id = 6;
|
||||
}
|
||||
Reference in New Issue
Block a user