pub struct OperatorConfig {
pub node_id: u64,
pub cluster_name: String,
pub namespace: String,
pub service_name: String,
pub raft_port: u16,
pub metrics_port: u16,
pub data_dir: String,
pub election_timeout_ms: u64,
pub heartbeat_interval_ms: u64,
pub snapshot_threshold: u64,
pub max_payload_entries: u64,
}Fields§
§node_id: u64§cluster_name: String§namespace: String§service_name: String§raft_port: u16§metrics_port: u16§data_dir: String§election_timeout_ms: u64§heartbeat_interval_ms: u64§snapshot_threshold: u64§max_payload_entries: u64Implementations§
Source§impl OperatorConfig
impl OperatorConfig
pub fn from_env() -> Result<OperatorConfig, OperatorError>
pub fn peer_address(&self, node_id: u64) -> String
Trait Implementations§
Source§impl Clone for OperatorConfig
impl Clone for OperatorConfig
Source§fn clone(&self) -> OperatorConfig
fn clone(&self) -> OperatorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperatorConfig
impl Debug for OperatorConfig
Source§impl Default for OperatorConfig
impl Default for OperatorConfig
Source§fn default() -> OperatorConfig
fn default() -> OperatorConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OperatorConfig
impl<'de> Deserialize<'de> for OperatorConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OperatorConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OperatorConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for OperatorConfig
impl Serialize for OperatorConfig
Source§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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for OperatorConfig
impl RefUnwindSafe for OperatorConfig
impl Send for OperatorConfig
impl Sync for OperatorConfig
impl Unpin for OperatorConfig
impl UnsafeUnpin for OperatorConfig
impl UnwindSafe for OperatorConfig
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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