Skip to main content

Crate qx_control

Crate qx_control 

Source
Expand description

控制面契约。

所有写操作都先变成带权限、原因和请求 ID 的 ControlCommand,由上层执行器 再决定如何调用策略运行时、OMS 或 Scheduler。本 crate 不提供绕过风控的快捷写入。

Structs§

AmendOrderTarget
AuditRecord
CancelOrderGroupTarget
CancelOrderGroup resolves its group ID against the worker’s durable order-group store.
CancelOrderTarget
CancelOrder 的路由声明。账户和 venue 必须由实时 worker 再与 EventLog 中的权威订单核对。
ControlAuditEntryV1
One audit row with its durable append sequence. The sequence is separate from the legacy persisted AuditRecord so the existing storage/audit-chain wire format remains unchanged.
ControlAuditPageV1
Bounded, snapshot-consistent page returned by GET /control/audit.
ControlAuditRecordV1
Versioned public response used by Paper/Live command submission and audit recovery routes.
ControlCommand
ControlPlane
RetirementSummary
退场摘要。控制面的持久审计在 qx-storage(AuditFileStore/SqliteAuditStore/ PostgresAuditStore + 哈希链),这一份只是内存 工作集;退场把它压回上界之内,而压掉了多少必须有个能被读到的数——否则「有界」这句话没有 证据面。读者是 /metrics 的 qx_control_retired_commands_total 与 qx_control_retired_audit_records_total 两条,以及持久化 JSON 里的同名字段。
StrategyLifecycleRecord
Latest successful lifecycle command, retained independently of bounded audit history.

Enums§

CommandKind
CommandStatus
控制命令的审计状态。只有三个变体:受理,以及执行后的两种终态。
ControlError
Permission

Constants§

CONTROL_AUDIT_DEFAULT_PAGE_SIZE
CONTROL_AUDIT_MAX_PAGE_BYTES
CONTROL_AUDIT_MAX_PAGE_SIZE
CONTROL_AUDIT_PAGE_SCHEMA_VERSION_V1
CONTROL_AUDIT_RECORD_SCHEMA_VERSION_V1
FINALIZED_COMMAND_RETENTION
控制面终态命令的保留上界。commands / requests / audit 三格只追加不退场,长跑进程 每受理一条命令就永久留下三处条目;越过上界按「终态审计写入顺序最早」退场(V13 R1-H 重落 V11 R5-1, 那份交付面被合流 c07ad22 按上游树整体裁定覆盖掉了)。
PENDING_CONTROL_COMMAND_LIMIT
Maximum number of accepted commands that have not yet reached a terminal audit status. Pending work is never retired silently; new submissions fail closed until workers make room.

Functions§

amend_order_target_from_command
cancel_order_group_target_from_command
cancel_order_target_from_command
Parse the explicit routing identity for a cancellation command. The execution worker must independently bind this identity to the authoritative order snapshot before contacting a venue.
order_from_submit_command
从已通过控制面校验的 SubmitOrder 载荷解析订单,并再次校验命令身份边界。
order_group_from_submit_command
Parse and bind an atomic OCO/Bracket intent to an audited control command.