Skip to main content

ServeArgs

Struct ServeArgs 

Source
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: u64

Seconds 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: usize

W-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: u64

Deadline 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: u64

v0.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

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl FromArgMatches for ServeArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,