pub struct ConsoleConfig {Show 14 fields
pub bind_address: String,
pub port: u16,
pub auth_endpoint: String,
pub aviladb_endpoint: String,
pub storage_endpoint: String,
pub observability_endpoint: String,
pub session_secret: String,
pub debug: bool,
pub cors_origins: Vec<String>,
pub rate_limit: u32,
pub ws_ping_interval: u64,
pub max_ws_connections: usize,
pub static_dir: String,
pub templates_dir: String,
}Expand description
Console configuration
Fields§
§bind_address: StringServer bind address
port: u16Server port
auth_endpoint: StringAVL Auth endpoint
aviladb_endpoint: StringAvilaDB endpoint
storage_endpoint: StringAVL Storage endpoint
observability_endpoint: StringAVL Observability endpoint
session_secret: StringSession secret for cookies
debug: boolEnable debug mode
cors_origins: Vec<String>CORS allowed origins
rate_limit: u32Rate limit: requests per minute
ws_ping_interval: u64WebSocket ping interval (seconds)
max_ws_connections: usizeMaximum WebSocket connections per user
static_dir: StringStatic files directory
templates_dir: StringTemplates directory
Implementations§
Source§impl ConsoleConfig
impl ConsoleConfig
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Load configuration from environment variables
§Environment Variables
AVL_CONSOLE_BIND: Server bind address (default: 127.0.0.1)AVL_CONSOLE_PORT: Server port (default: 8080)AVL_AUTH_ENDPOINT: AVL Auth endpointAVL_AVILADB_ENDPOINT: AvilaDB endpointAVL_STORAGE_ENDPOINT: Storage endpointAVL_OBSERVABILITY_ENDPOINT: Observability endpointAVL_CONSOLE_SECRET: Session secretAVL_CONSOLE_DEBUG: Enable debug mode
Trait Implementations§
Source§impl Clone for ConsoleConfig
impl Clone for ConsoleConfig
Source§fn clone(&self) -> ConsoleConfig
fn clone(&self) -> ConsoleConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsoleConfig
impl Debug for ConsoleConfig
Source§impl Default for ConsoleConfig
impl Default for ConsoleConfig
Source§impl<'de> Deserialize<'de> for ConsoleConfig
impl<'de> Deserialize<'de> for ConsoleConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConsoleConfig
impl RefUnwindSafe for ConsoleConfig
impl Send for ConsoleConfig
impl Sync for ConsoleConfig
impl Unpin for ConsoleConfig
impl UnwindSafe for ConsoleConfig
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