pub struct Config {
pub bind_address: String,
pub port: u16,
pub default_partitions: u32,
pub enable_persistence: bool,
pub data_dir: String,
pub max_segment_size: u64,
pub log_level: String,
}Expand description
Configuration for Rivven
Fields§
§bind_address: StringServer bind address
port: u16Server port
default_partitions: u32Default number of partitions for new topics
enable_persistence: boolEnable disk persistence
data_dir: StringData directory for persistence
max_segment_size: u64Maximum segment size in bytes
log_level: StringLog level
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_bind_address(self, address: String) -> Self
pub fn with_bind_address(self, address: String) -> Self
Set the bind address
Sourcepub fn with_default_partitions(self, partitions: u32) -> Self
pub fn with_default_partitions(self, partitions: u32) -> Self
Set the default partitions
Sourcepub fn with_persistence(self, enabled: bool) -> Self
pub fn with_persistence(self, enabled: bool) -> Self
Enable or disable persistence
Sourcepub fn with_data_dir(self, data_dir: String) -> Self
pub fn with_data_dir(self, data_dir: String) -> Self
Set the data directory
Sourcepub fn server_address(&self) -> String
pub fn server_address(&self) -> String
Get the server address
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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 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>
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