pub struct Config {Show 24 fields
pub grpc_host: String,
pub grpc_port: u16,
pub http_host: String,
pub http_port: u16,
pub db_path: String,
pub db_max_connections: u32,
pub premade_dir: PathBuf,
pub max_command_length: usize,
pub max_encrypted_payload_length: usize,
pub max_description_length: usize,
pub max_tags: usize,
pub max_tag_length: usize,
pub max_id_length: usize,
pub max_device_id_length: usize,
pub max_api_key_length: usize,
pub request_timeout_secs: u64,
pub grpc_max_message_size: u32,
pub rate_limit_per_minute: u32,
pub register_per_minute: u32,
pub metrics_auth_failures_per_minute: u32,
pub trusted_proxies: Vec<String>,
pub metrics_username: Option<String>,
pub metrics_password: Option<String>,
pub cors_allowed_origins: Vec<String>,
}Fields§
§grpc_host: String§grpc_port: u16§http_host: String§http_port: u16§db_path: String§db_max_connections: u32§premade_dir: PathBuf§max_command_length: usize§max_encrypted_payload_length: usize§max_description_length: usize§max_tag_length: usize§max_id_length: usize§max_device_id_length: usize§max_api_key_length: usize§request_timeout_secs: u64§grpc_max_message_size: u32§rate_limit_per_minute: u32§register_per_minute: u32Global per-minute ceiling on account creation, across all peers.
metrics_auth_failures_per_minute: u32Global per-minute ceiling on failed /metrics authentications.
trusted_proxies: Vec<String>§metrics_username: Option<String>§metrics_password: Option<String>§cors_allowed_origins: Vec<String>Implementations§
Source§impl Config
impl Config
pub fn load() -> Result<Self, ConfigLoadError>
pub fn ensure_config_file()
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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