pub struct TaskQueueConfig {
pub redis: RedisConfig,
pub workers: WorkerConfig,
pub autoscaler: AutoScalerConfig,
pub auto_register: AutoRegisterConfig,
pub scheduler: SchedulerConfig,
pub actix: ActixConfig,
pub axum: AxumConfig,
}
Expand description
Main configuration structure for the task queue system
Fields§
§redis: RedisConfig
Redis connection configuration
workers: WorkerConfig
Worker configuration
autoscaler: AutoScalerConfig
Auto-scaling configuration
auto_register: AutoRegisterConfig
Auto-registration settings
scheduler: SchedulerConfig
Scheduler configuration
actix: ActixConfig
Actix Web integration settings
axum: AxumConfig
Axum integration settings
Implementations§
Source§impl TaskQueueConfig
impl TaskQueueConfig
Sourcepub fn validate(&self) -> Result<(), TaskQueueError>
pub fn validate(&self) -> Result<(), TaskQueueError>
Validate the entire configuration
Sourcepub fn from_env() -> Result<Self, TaskQueueError>
pub fn from_env() -> Result<Self, TaskQueueError>
Load configuration from environment variables only
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, TaskQueueError>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, TaskQueueError>
Load configuration from a file (TOML or YAML based on extension)
Sourcepub fn load() -> Result<Self, TaskQueueError>
pub fn load() -> Result<Self, TaskQueueError>
Load configuration with automatic source detection and validation
Sourcepub fn init_global() -> Result<&'static Self, TaskQueueError>
pub fn init_global() -> Result<&'static Self, TaskQueueError>
Initialize global configuration if not already done
Sourcepub fn get_or_init() -> Result<&'static Self, TaskQueueError>
pub fn get_or_init() -> Result<&'static Self, TaskQueueError>
Get global configuration or initialize it
Trait Implementations§
Source§impl Clone for TaskQueueConfig
impl Clone for TaskQueueConfig
Source§fn clone(&self) -> TaskQueueConfig
fn clone(&self) -> TaskQueueConfig
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 TaskQueueConfig
impl Debug for TaskQueueConfig
Source§impl Default for TaskQueueConfig
impl Default for TaskQueueConfig
Source§fn default() -> TaskQueueConfig
fn default() -> TaskQueueConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TaskQueueConfig
impl<'de> Deserialize<'de> for TaskQueueConfig
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 TaskQueueConfig
impl RefUnwindSafe for TaskQueueConfig
impl Send for TaskQueueConfig
impl Sync for TaskQueueConfig
impl Unpin for TaskQueueConfig
impl UnwindSafe for TaskQueueConfig
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