Struct NautilusKernelConfig

Source
pub struct NautilusKernelConfig {
Show 19 fields pub environment: Environment, pub trader_id: TraderId, pub load_state: bool, pub save_state: bool, pub logging: LoggerConfig, pub instance_id: Option<UUID4>, pub timeout_connection: u32, pub timeout_reconciliation: u32, pub timeout_portfolio: u32, pub timeout_disconnection: u32, pub timeout_post_stop: u32, pub timeout_shutdown: u32, pub cache: Option<CacheConfig>, pub msgbus: Option<MessageBusConfig>, pub data_engine: Option<DataEngineConfig>, pub risk_engine: Option<RiskEngineConfig>, pub exec_engine: Option<ExecutionEngineConfig>, pub portfolio: Option<PortfolioConfig>, pub streaming: Option<StreamingConfig>,
}
Expand description

Configuration for a NautilusKernel core system instance.

Fields§

§environment: Environment

The kernel environment context.

§trader_id: TraderId

The trader ID for the node (must be a name and ID tag separated by a hyphen).

§load_state: bool

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

§save_state: bool

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

§logging: LoggerConfig

The logging configuration for the kernel.

§instance_id: Option<UUID4>

The unique instance identifier for the kernel

§timeout_connection: u32

The timeout (seconds) for all clients to connect and initialize.

§timeout_reconciliation: u32

The timeout (seconds) for execution state to reconcile.

§timeout_portfolio: u32

The timeout (seconds) for portfolio to initialize margins and unrealized pnls.

§timeout_disconnection: u32

The timeout (seconds) for all engine clients to disconnect.

§timeout_post_stop: u32

The timeout (seconds) after stopping the node to await residual events before final shutdown.

§timeout_shutdown: u32

The timeout (seconds) to await pending tasks cancellation during shutdown.

§cache: Option<CacheConfig>

The cache configuration.

§msgbus: Option<MessageBusConfig>

The message bus configuration.

§data_engine: Option<DataEngineConfig>

The data engine configuration.

§risk_engine: Option<RiskEngineConfig>

The risk engine configuration.

§exec_engine: Option<ExecutionEngineConfig>

The execution engine configuration.

§portfolio: Option<PortfolioConfig>

The portfolio configuration.

§streaming: Option<StreamingConfig>

The configuration for streaming to feather files.

Implementations§

Source§

impl NautilusKernelConfig

Source

pub fn new( environment: Environment, trader_id: TraderId, load_state: Option<bool>, save_state: Option<bool>, timeout_connection: Option<u32>, timeout_reconciliation: Option<u32>, timeout_portfolio: Option<u32>, timeout_disconnection: Option<u32>, timeout_post_stop: Option<u32>, timeout_shutdown: Option<u32>, logging: Option<LoggerConfig>, instance_id: Option<UUID4>, cache: Option<CacheConfig>, msgbus: Option<MessageBusConfig>, data_engine: Option<DataEngineConfig>, risk_engine: Option<RiskEngineConfig>, exec_engine: Option<ExecutionEngineConfig>, portfolio: Option<PortfolioConfig>, streaming: Option<StreamingConfig>, ) -> Self

Trait Implementations§

Source§

impl Clone for NautilusKernelConfig

Source§

fn clone(&self) -> NautilusKernelConfig

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NautilusKernelConfig

Source§

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

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

impl Default for NautilusKernelConfig

Source§

fn default() -> Self

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

Auto Trait Implementations§

Blanket Implementations§

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

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

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> Ungil for T
where T: Send,