pub struct OpenraftConfig {
pub id: u64,
pub raft_addr: SocketAddr,
pub raft_dir: PathBuf,
pub bootstrap: bool,
pub initial_membership: Option<BTreeMap<u64, MemberAddr>>,
pub tuning: RaftTuning,
pub peer_tls: Option<PeerTlsConfig>,
pub admin_listen: Option<SocketAddr>,
pub admin_tls: Option<AdminTlsConfig>,
pub allow_insecure_peer: bool,
}Fields§
§id: u64§raft_addr: SocketAddr§raft_dir: PathBuf§bootstrap: bool§initial_membership: Option<BTreeMap<u64, MemberAddr>>Required ONLY with bootstrap; None on a non-bootstrap restart
(membership recovers from raft state, #408).
tuning: RaftTuning§peer_tls: Option<PeerTlsConfig>§admin_listen: Option<SocketAddr>Bind address for the membership-admin gRPC server. None serves no
admin surface.
admin_tls: Option<AdminTlsConfig>mTLS material for the admin gRPC server. None means plaintext on
loopback only; routable admin_listen without TLS is rejected at
build() (see StandaloneError::AdminInsecureRoutable).
allow_insecure_peer: boolWhen false, a non-loopback raft_addr without peer_tls is
rejected at build() (see StandaloneError::PeerInsecureRoutable).
Set true to opt out — intended only for single-host dev or
service-mesh-terminated mTLS, and matches the helm chart’s
tls.allowInsecurePeer.
Trait Implementations§
Source§impl Clone for OpenraftConfig
impl Clone for OpenraftConfig
Source§fn clone(&self) -> OpenraftConfig
fn clone(&self) -> OpenraftConfig
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 moreAuto Trait Implementations§
impl Freeze for OpenraftConfig
impl RefUnwindSafe for OpenraftConfig
impl Send for OpenraftConfig
impl Sync for OpenraftConfig
impl Unpin for OpenraftConfig
impl UnsafeUnpin for OpenraftConfig
impl UnwindSafe for OpenraftConfig
Blanket Implementations§
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request