pub struct Args {Show 20 fields
pub http: bool,
pub http_host: String,
pub http_port: u16,
pub grpc: bool,
pub grpc_host: String,
pub grpc_port: u16,
pub redis: bool,
pub redis_host: String,
pub redis_port: u16,
pub store: StoreType,
pub store_capacity: usize,
pub store_cleanup_interval: u64,
pub store_cleanup_probability: u64,
pub store_min_interval: u64,
pub store_max_interval: u64,
pub store_max_operations: usize,
pub buffer_size: usize,
pub max_denied_keys: u32,
pub log_level: String,
pub list_env_vars: bool,
}Expand description
Command-line arguments for the server
All arguments can also be set via environment variables with the THROTTLECRAB_ prefix. CLI arguments take precedence over environment variables.
§Examples
Basic usage with HTTP protocol:
throttlecrab-server --httpMultiple transports with custom ports:
throttlecrab-server --http --http-port 8080 --grpc --grpc-port 50051Using adaptive store with debug logging:
throttlecrab-server --http --store adaptive --log-level debugFields§
§http: bool§http_host: String§http_port: u16§grpc: bool§grpc_host: String§grpc_port: u16§redis: bool§redis_host: String§redis_port: u16§store: StoreType§store_capacity: usize§store_cleanup_interval: u64§store_cleanup_probability: u64§store_min_interval: u64§store_max_interval: u64§store_max_operations: usize§buffer_size: usize§max_denied_keys: u32§log_level: String§list_env_vars: boolTrait Implementations§
Source§impl Args for Args
impl Args for Args
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
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
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>
Assign values from
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>
Assign values from
ArgMatches to self.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
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> 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> 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