pub struct AppState {
pub storage: Arc<dyn StorageBackend>,
pub cache: QueryCache,
pub cache_state: Arc<CacheState>,
pub pricing: PricingCache,
pub start_time: Arc<Instant>,
pub otlp_grpc_port: u16,
pub otlp_http_port: u16,
}Expand description
Shared application state
Fields§
§storage: Arc<dyn StorageBackend>§cache: QueryCache§cache_state: Arc<CacheState>Short-TTL response cache + in-flight dedup for read-only endpoints.
pricing: PricingCacheLiteLLM pricing database, refreshed periodically in the background.
start_time: Arc<Instant>Time at which the server started (for uptime calculation)
otlp_grpc_port: u16OTLP receiver ports, populated from DashboardConfig
otlp_http_port: u16Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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