pub struct ServeArgs {Show 13 fields
pub host: String,
pub port: u16,
pub tls_cert: Option<PathBuf>,
pub tls_key: Option<PathBuf>,
pub mtls_allowlist: Option<PathBuf>,
pub shutdown_grace_secs: u64,
pub quorum_writes: usize,
pub quorum_peers: Vec<String>,
pub quorum_timeout_ms: u64,
pub quorum_client_cert: Option<PathBuf>,
pub quorum_client_key: Option<PathBuf>,
pub quorum_ca_cert: Option<PathBuf>,
pub catchup_interval_secs: u64,
}Fields§
§host: String§port: u16§tls_cert: Option<PathBuf>Path to PEM-encoded TLS certificate (may include the full chain).
Passing both --tls-cert and --tls-key switches serve to
HTTPS. rustls under the hood — no OpenSSL dep. Absent both
flags = plain HTTP (same as every previous release).
tls_key: Option<PathBuf>Path to PEM-encoded TLS private key (PKCS#8 or RSA).
mtls_allowlist: Option<PathBuf>Path to a file containing SHA-256 fingerprints of trusted client
certificates, one per line (case-insensitive hex, optionally with
: separators; comments start with #). When set, serve
demands client-cert mTLS on every connection and refuses any peer
whose cert fingerprint is not on the list. Requires --tls-cert
and --tls-key. This is the peer-mesh identity gate — a peer
without an authorised cert can’t even open a TCP connection, let
alone hit /sync/push. Layer 2 of the peer-mesh crypto stack;
attested agent_id extraction (Layer 2b) lands post-v0.6.0.
shutdown_grace_secs: u64Seconds to wait for in-flight requests to complete on graceful
shutdown (SIGINT). Default 30. Bumped from 10 in v0.6.0 because
large /sync/push batches can take longer than 10s under load
(red-team #233).
quorum_writes: usizeW-of-N write quorum. When >=1 and --quorum-peers is non-empty,
every HTTP write fans out to every peer and returns OK only
after the local commit + W-1 peer acks land within
--quorum-timeout-ms. Default 0 = federation disabled, daemon
behaves exactly like v0.6.0.
quorum_peers: Vec<String>Comma-separated list of peer base URLs. Each peer is assumed to
expose POST /api/v1/sync/push — the same endpoint the
sync-daemon already uses.
quorum_timeout_ms: u64Deadline for quorum-ack collection. After this many ms the
write returns 503 quorum_not_met. Default 2000.
quorum_client_cert: Option<PathBuf>Optional mTLS client cert for outbound federation POSTs. Same
cert material the sync-daemon’s --client-cert accepts.
quorum_client_key: Option<PathBuf>Optional mTLS client key for outbound federation POSTs.
quorum_ca_cert: Option<PathBuf>Optional root CA cert to trust for outbound federation HTTPS.
Required whenever peers present a cert NOT rooted in Mozilla’s
webpki-roots bundle (self-signed, private CA, ephemeral test
CA, etc.) — without this, the reqwest rustls-tls client rejects
peer certs and every quorum write times out as quorum_not_met.
See #333.
catchup_interval_secs: u64v0.6.0.1 (#320) — how often, in seconds, the daemon pulls peers for any updates it missed while offline or partitioned. 0 disables the catchup loop entirely. Default 30s keeps a post-partition node convergent within one interval after resume.
Trait Implementations§
Source§impl Args for ServeArgs
impl Args for ServeArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for ServeArgs
impl FromArgMatches for ServeArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ServeArgs
impl RefUnwindSafe for ServeArgs
impl Send for ServeArgs
impl Sync for ServeArgs
impl Unpin for ServeArgs
impl UnsafeUnpin for ServeArgs
impl UnwindSafe for ServeArgs
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
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>
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