Struct StreamingConfig
pub struct StreamingConfig {Show 14 fields
pub writer_path: String,
pub catalog: Option<DataCatalogConfig>,
pub flush_interval_ms: u64,
pub replace_existing: bool,
pub rotation_config: RotationConfig,
pub promotion_interval_ms: Option<u64>,
pub promote_on_close: bool,
pub delete_feather_after_promotion: bool,
pub use_ts_event_for_ts_init: bool,
pub data_types: Option<Vec<NautilusDataType>>,
pub record_types: Option<Vec<NautilusRecordType>>,
pub instrument_types: Option<Vec<NautilusInstrumentType>>,
pub record_filters: Option<Vec<StreamingRecordFilterConfig>>,
pub params: Option<Params>,
}Expand description
Configuration streaming live or backtest runs to a persistence writer.
The writer appends Feather files under the local writer_path, in one
{backtest|sandbox|live}/{instance_id} directory per run. With a catalog, the writer for
that catalog’s backend also promotes the files into it; without one, the Feather files are the
only output.
Fields§
§writer_path: StringLocal directory the writer appends Feather files to.
catalog: Option<DataCatalogConfig>Catalog that receives promoted data; omit to keep only the Feather files.
flush_interval_ms: u64Flush interval in milliseconds.
replace_existing: boolWhether to replace existing files.
rotation_config: RotationConfigRotation configuration.
promotion_interval_ms: Option<u64>Interval in milliseconds for promoting sealed files into catalog; omit for no interval.
promote_on_close: boolWhether closing the writer promotes remaining files into catalog.
delete_feather_after_promotion: boolWhether Feather files are deleted after a successful promotion.
use_ts_event_for_ts_init: boolWhether promotion replaces ts_init with ts_event.
data_types: Option<Vec<NautilusDataType>>Optional data families to write.
record_types: Option<Vec<NautilusRecordType>>Optional record families to write.
instrument_types: Option<Vec<NautilusInstrumentType>>Optional instrument families to write.
record_filters: Option<Vec<StreamingRecordFilterConfig>>Optional record family and identifier filters.
params: Option<Params>Backend-specific writer parameters.
Implementations§
§impl StreamingConfig
impl StreamingConfig
pub fn builder() -> StreamingConfigBuilder
pub fn builder() -> StreamingConfigBuilder
Create an instance of StreamingConfig using the builder syntax
§impl StreamingConfig
impl StreamingConfig
pub fn new(
writer_path: String,
catalog: Option<DataCatalogConfig>,
flush_interval_ms: u64,
replace_existing: bool,
rotation_config: RotationConfig,
) -> StreamingConfig
pub fn new( writer_path: String, catalog: Option<DataCatalogConfig>, flush_interval_ms: u64, replace_existing: bool, rotation_config: RotationConfig, ) -> StreamingConfig
Creates new StreamingConfig instance.
pub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validates the streaming configuration, collecting every field violation.
§Errors
Returns an error if any field fails validation. Multiple validation failures are collected into one error.
pub fn writer_backend(&self) -> WriterBackendType
pub fn writer_backend(&self) -> WriterBackendType
Returns the writer backend: Feather without a catalog, otherwise the catalog’s backend.
Trait Implementations§
§impl Clone for StreamingConfig
impl Clone for StreamingConfig
§fn clone(&self) -> StreamingConfig
fn clone(&self) -> StreamingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for StreamingConfig
impl Debug for StreamingConfig
impl DerefToPyAny for StreamingConfig
§impl<'de> Deserialize<'de> for StreamingConfig
impl<'de> Deserialize<'de> for StreamingConfig
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl<'a, 'py> FromPyObject<'a, 'py> for StreamingConfigwhere
StreamingConfig: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for StreamingConfigwhere
StreamingConfig: Clone,
§type Error = PyClassGuardError<'a, 'py>
type Error = PyClassGuardError<'a, 'py>
§fn extract(
obj: Borrowed<'a, 'py, PyAny>,
) -> Result<StreamingConfig, <StreamingConfig as FromPyObject<'a, 'py>>::Error>
fn extract( obj: Borrowed<'a, 'py, PyAny>, ) -> Result<StreamingConfig, <StreamingConfig as FromPyObject<'a, 'py>>::Error>
§impl<'py> IntoPyObject<'py> for StreamingConfig
impl<'py> IntoPyObject<'py> for StreamingConfig
§type Target = StreamingConfig
type Target = StreamingConfig
§type Output = Bound<'py, <StreamingConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <StreamingConfig as IntoPyObject<'py>>::Target>
§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<StreamingConfig as IntoPyObject<'py>>::Output, <StreamingConfig as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<StreamingConfig as IntoPyObject<'py>>::Output, <StreamingConfig as IntoPyObject<'py>>::Error>
§impl PyClass for StreamingConfig
impl PyClass for StreamingConfig
§impl PyStubType for StreamingConfig
impl PyStubType for StreamingConfig
§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
§impl PyTypeInfo for StreamingConfig
impl PyTypeInfo for StreamingConfig
§const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
const NAME: &'static str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
§const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&'static str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.§impl Serialize for StreamingConfig
impl Serialize for StreamingConfig
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for StreamingConfig
impl RefUnwindSafe for StreamingConfig
impl Send for StreamingConfig
impl Sync for StreamingConfig
impl Unpin for StreamingConfig
impl UnsafeUnpin for StreamingConfig
impl UnwindSafe for StreamingConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
self into a [Py<PyAny>] when the underlying conversion is infallible.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more