Struct ServeArgs
pub struct ServeArgs {
pub storage: String,
pub bind: Option<String>,
pub max_connections: usize,
}Expand description
atune serve — expose a study over TCP for remote workers.
Wraps any storage (:memory:, a *.atj journal, a *.db database) and
answers the RemoteStorage wire protocol, so workers on other machines share
one study without a shared filesystem. See
resuming and scaling a study.
There is no authentication and no TLS. Bind to loopback, or put the server
behind a private VPN with host firewall and cloud/network ACL controls. Use
an mTLS proxy where client identity is required; a private LAN alone is not
an identity boundary. The bind defaults to loopback for this reason.
Fields§
§storage: StringThe backing storage to serve, as a spec: :memory:, a *.atj journal,
or a *.db/*.sqlite/*.sqlite3 database. Created if it does not exist.
Local Journal (*.atj) and SQLite (*.db, *.sqlite, *.sqlite3)
files are plaintext. Require restrictive file permissions, an encrypted
volume, and protected backups (encrypted when transferred).
bind: Option<String>The address to bind. Defaults to 127.0.0.1:7878 (loopback only).
A non-loopback address (0.0.0.0:PORT, a VPN IP) exposes the store with
no authentication and no TLS: anyone who can reach the address can read
and modify every study in it. Use loopback, or a private VPN with host
firewall and cloud/network ACL controls; put an mTLS proxy in front when
client identity is required. A private LAN alone is not an identity
boundary. See
resuming and scaling a study.
max_connections: usizeHow many workers may be connected at the same time.
Each connection costs one thread on the server, so this is the bound on what a crowd of workers — or a stuck one that never disconnects — can make the process hold. A worker that arrives when the limit is already reached is refused immediately with an error naming the limit, rather than queued or left waiting, and may retry once another disconnects.
Trait Implementations§
§impl Args for ServeArgs
impl Args for ServeArgs
§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of arguments§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
§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 more§impl FromArgMatches for ServeArgs
impl FromArgMatches for ServeArgs
§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
§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>
§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.§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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