pub struct DashboardServer { /* private fields */ }Implementations§
Source§impl DashboardServer
impl DashboardServer
Sourcepub fn new(config: DashboardConfig, storage: Arc<dyn StorageBackend>) -> Self
pub fn new(config: DashboardConfig, storage: Arc<dyn StorageBackend>) -> Self
Create a new dashboard server (production path: the pricing cache runs its background LiteLLM refresher).
Sourcepub fn with_pricing_cache(
config: DashboardConfig,
storage: Arc<dyn StorageBackend>,
pricing: PricingCache,
) -> Self
pub fn with_pricing_cache( config: DashboardConfig, storage: Arc<dyn StorageBackend>, pricing: PricingCache, ) -> Self
Create a dashboard server with a caller-managed pricing cache.
Tests use this with a plain PricingCache::new (no background
refresher) so pricing behaviour is deterministic — the empty
database plus the Claude fallback table, with no live network
fetch racing the assertions.
Sourcepub fn shutdown_handle(&self) -> DashboardShutdown
pub fn shutdown_handle(&self) -> DashboardShutdown
Handle for triggering graceful shutdown from a signal handler.
Sourcepub fn build_router(&self) -> Router
pub fn build_router(&self) -> Router
Build the router with all routes
Auto Trait Implementations§
impl !RefUnwindSafe for DashboardServer
impl !UnwindSafe for DashboardServer
impl Freeze for DashboardServer
impl Send for DashboardServer
impl Sync for DashboardServer
impl Unpin for DashboardServer
impl UnsafeUnpin for DashboardServer
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