Skip to main content

Crate longtrader_worker

Crate longtrader_worker 

Source
Expand description

Local strategy host: portable strategies over proto-only ports, pluggable backends (exchange daemon / terminal API / mock), and a session control plane for external-language strategies.

Dependency rule: this crate depends on generated protobuf types and public registry crates only — never on sibling-repo domain crates.

Modules§

adapters
Backend adapters implementing the strategy-facing ports.
config
envelope
Connect streaming envelope helpers, re-exported from the contract crate.
indicators
Compact incremental indicators for worker strategies.
overflow
Backpressure-aware channel plumbing (design doc §6.5).
ports
Strategy-facing ports whose DTOs are generated protobuf types.
proto
Shared aliases for the generated contract modules.
risk
Pre-trade risk gate.
session
Session control plane: deterministic recovery state machine, lease watchdog with kill-switch execution, and the strategy event bus.
state_store
File-backed strategy state store.
strategies
Portable strategies. A strategy depends only on the ports in crate::ports; backend selection is config-driven.