Skip to main content

LiveNodeConfig

Struct LiveNodeConfig 

Source
pub struct LiveNodeConfig {
Show 28 fields pub environment: Environment, pub trader_id: TraderId, pub load_state: bool, pub save_state: bool, pub shutdown_on_error: bool, pub logging: LoggerConfig, pub instance_id: Option<UUID4>, pub timeout_connection: Duration, pub timeout_reconciliation: Duration, pub timeout_portfolio: Duration, pub timeout_disconnection: Duration, pub delay_post_stop: Duration, pub timeout_shutdown: Duration, pub cache: Option<CacheConfig>, pub msgbus: Option<MessageBusConfig>, pub portfolio: Option<PortfolioConfig>, pub emulator: Option<OrderEmulatorConfig>, pub streaming: Option<StreamingConfig>, pub queue_monitor: Option<QueueMonitorConfig>, pub event_store: Option<EventStoreConfig>, pub loop_debug: bool, pub data_engine: LiveDataEngineConfig, pub risk_engine: LiveRiskEngineConfig, pub exec_engine: LiveExecEngineConfig, pub data_clients: HashMap<String, LiveDataClientConfig>, pub exec_clients: HashMap<String, LiveExecClientConfig>, pub controller: Option<ImportableControllerConfig>, pub plugins: Vec<PluginConfig>,
}
Expand description

Configuration for live Nautilus system nodes.

Fields§

§environment: Environment

The trading environment.

§trader_id: TraderId

The trader ID for the node.

§load_state: bool

If actor and strategy state should be loaded from the database on start.

§save_state: bool

If actor and strategy state should be saved to the database on stop.

§shutdown_on_error: bool

If the system should request shutdown when an error log is emitted.

Filtered or bypassed error logs still request shutdown.

§logging: LoggerConfig

The logging configuration for the kernel.

§instance_id: Option<UUID4>

The unique instance identifier for the kernel

§timeout_connection: Duration

The timeout for all clients to connect and initialize.

§timeout_reconciliation: Duration

The timeout for startup reconciliation and each continuous report-collection task.

§timeout_portfolio: Duration

The timeout for portfolio to initialize margins and unrealized pnls.

§timeout_disconnection: Duration

The timeout for all engine clients to disconnect.

§delay_post_stop: Duration

The delay after stopping the node to await residual events before final shutdown.

§timeout_shutdown: Duration

The timeout to await pending tasks cancellation during shutdown.

§cache: Option<CacheConfig>

The cache configuration.

§msgbus: Option<MessageBusConfig>

The message bus configuration.

§portfolio: Option<PortfolioConfig>

The portfolio configuration.

§emulator: Option<OrderEmulatorConfig>

The order emulator configuration.

§streaming: Option<StreamingConfig>

The configuration for streaming to feather files.

§queue_monitor: Option<QueueMonitorConfig>

The optional runner queue pressure monitor configuration.

§event_store: Option<EventStoreConfig>

The event-store configuration.

When set, the live node boots a kernel-managed event-store run for audit and replay. The caller supplies a factory via LiveNodeBuilder::with_event_store to construct the concrete KernelEventStore; this field carries the configuration that factory reads.

§loop_debug: bool

If the asyncio event loop should run in debug mode.

§data_engine: LiveDataEngineConfig

The live data engine configuration.

§risk_engine: LiveRiskEngineConfig

The live risk engine configuration.

§exec_engine: LiveExecEngineConfig

The live execution engine configuration.

§data_clients: HashMap<String, LiveDataClientConfig>

The data client configurations.

§exec_clients: HashMap<String, LiveExecClientConfig>

The execution client configurations.

§controller: Option<ImportableControllerConfig>

The importable controller configuration.

§plugins: Vec<PluginConfig>

The Rust-native plug-in instances to load before startup.

Implementations§

Source§

impl LiveNodeConfig

Source

pub fn builder() -> LiveNodeConfigBuilder

Create an instance of LiveNodeConfig using the builder syntax

Trait Implementations§

Source§

impl Clone for LiveNodeConfig

Source§

fn clone(&self) -> LiveNodeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveNodeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LiveNodeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LiveNodeConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl NautilusKernelConfig for LiveNodeConfig

Source§

fn environment(&self) -> Environment

Returns the kernel environment context.
Source§

fn trader_id(&self) -> TraderId

Returns the trader ID for the node.
Source§

fn load_state(&self) -> bool

Returns if actor and strategy state should be loaded from the database on start.
Source§

fn save_state(&self) -> bool

Returns if actor and strategy state should be saved to the database on stop.
Source§

fn shutdown_on_error(&self) -> bool

Returns if the system should request shutdown when an error log is emitted. Read more
Source§

fn logging(&self) -> LoggerConfig

Returns the logging configuration for the kernel.
Source§

fn instance_id(&self) -> Option<UUID4>

Returns the unique instance identifier for the kernel.
Source§

fn timeout_connection(&self) -> Duration

Returns the timeout for all clients to connect and initialize.
Source§

fn timeout_reconciliation(&self) -> Duration

Returns the timeout for execution state to reconcile.
Source§

fn timeout_portfolio(&self) -> Duration

Returns the timeout for portfolio to initialize margins and unrealized pnls.
Source§

fn timeout_disconnection(&self) -> Duration

Returns the timeout for all engine clients to disconnect.
Source§

fn delay_post_stop(&self) -> Duration

Returns the timeout after stopping the node to await residual events before final shutdown.
Source§

fn timeout_shutdown(&self) -> Duration

Returns the timeout to await pending tasks cancellation during shutdown.
Source§

fn cache(&self) -> Option<CacheConfig>

Returns the cache configuration.
Source§

fn msgbus(&self) -> Option<MessageBusConfig>

Returns the message bus configuration.
Source§

fn data_engine(&self) -> Option<DataEngineConfig>

Returns the data engine configuration.
Source§

fn risk_engine(&self) -> Option<RiskEngineConfig>

Returns the risk engine configuration.
Source§

fn exec_engine(&self) -> Option<ExecutionEngineConfig>

Returns the execution engine configuration.
Source§

fn portfolio(&self) -> Option<PortfolioConfig>

Returns the portfolio configuration.
Source§

fn streaming(&self) -> Option<StreamingConfig>

Returns the configuration for streaming to feather files.
Source§

impl Serialize for LiveNodeConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.